-
Notifications
You must be signed in to change notification settings - Fork 131
chore: add x-goog-request-id insertion into *Exception #3813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add x-goog-request-id insertion into *Exception #3813
Conversation
6ab4f05
to
4d3f093
Compare
f9eb16b
to
b91b415
Compare
b91b415
to
a4dd421
Compare
@rahul2393 kindly help me again as I had to rebase from the latest main |
Allows users to examine and report the requestId in any thrown exceptions. Updates googleapis#3537
a4dd421
to
ae29724
Compare
Exception exc = new StatusRuntimeException(status); | ||
SpannerException spannerExceptionWithReqId = | ||
SpannerExceptionFactory.newSpannerException(exc, reqIdIn); | ||
assertThat(spannerExceptionWithReqId.getRequestId()).isEqualTo(reqIdIn.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, for following pull requests: Please prefer the use of standard JUnit assertEquals(expected, actual)
over assertThat
, even when the test class in question uses assertThat
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it and thank you @olavloite.
c102cb4
into
googleapis:main
Allows users to examine and report the requestId in any thrown exceptions.