Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

chore: add x-goog-request-id insertion into *Exception#3813

Merged
gcf-merge-on-green[bot] merged 3 commits intogoogleapis:mainfrom
odeke-em:x-goog-request-id-base
Apr 15, 2025
Merged

chore: add x-goog-request-id insertion into *Exception#3813
gcf-merge-on-green[bot] merged 3 commits intogoogleapis:mainfrom
odeke-em:x-goog-request-id-base

Conversation

@odeke-em
Copy link
Copy Markdown
Contributor

@odeke-em odeke-em commented Apr 9, 2025

Allows users to examine and report the requestId in any thrown exceptions.

@odeke-em odeke-em requested review from a team April 9, 2025 16:00
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Apr 9, 2025
@odeke-em odeke-em force-pushed the x-goog-request-id-base branch from 6ab4f05 to 4d3f093 Compare April 9, 2025 16:02
@product-auto-label product-auto-label Bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Apr 10, 2025
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@odeke-em odeke-em force-pushed the x-goog-request-id-base branch from f9eb16b to b91b415 Compare April 10, 2025 18:27
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@odeke-em odeke-em force-pushed the x-goog-request-id-base branch from b91b415 to a4dd421 Compare April 10, 2025 18:28
@odeke-em
Copy link
Copy Markdown
Contributor Author

@rahul2393 kindly help me again as I had to rebase from the latest main

@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 10, 2025
Allows users to examine and report the requestId in any
thrown exceptions.

Updates #3537
@odeke-em odeke-em force-pushed the x-goog-request-id-base branch from a4dd421 to ae29724 Compare April 10, 2025 20:17
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Apr 10, 2025
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2025
@sakthivelmanii sakthivelmanii added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 11, 2025
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 15, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 15, 2025
Exception exc = new StatusRuntimeException(status);
SpannerException spannerExceptionWithReqId =
SpannerExceptionFactory.newSpannerException(exc, reqIdIn);
assertThat(spannerExceptionWithReqId.getRequestId()).isEqualTo(reqIdIn.toString());
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

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.

@olavloite olavloite added the automerge Merge the pull request once unit tests and other checks pass. label Apr 15, 2025
@gcf-merge-on-green gcf-merge-on-green Bot merged commit c102cb4 into googleapis:main Apr 15, 2025
31 of 32 checks passed
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Apr 15, 2025
@odeke-em odeke-em deleted the x-goog-request-id-base branch April 15, 2025 11:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants