[#12990] fix(catalog-glue): Include the AWS error detail in Glue failure messages - #12991
Open
diqiu50 wants to merge 3 commits into
Open
[#12990] fix(catalog-glue): Include the AWS error detail in Glue failure messages#12991diqiu50 wants to merge 3 commits into
diqiu50 wants to merge 3 commits into
Conversation
…e failure messages Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSH2qgg3eHh7acHzUkHrS4
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
This PR improves the usefulness of Glue-related exception messages by including AWS-provided error codes and messages in the converter’s fallback branch, and adds unit tests to validate the enriched output and existing mappings.
Changes:
- Enrich fallback
RuntimeExceptionmessages with AWS error details (code/message) when available. - Add
awsErrorDetail(...)helper to render best-effort AWS error information. - Add unit tests covering enriched messages and existing recognized exception mappings.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueExceptionConverter.java |
Appends AWS error detail to fallback error messages and adds helper to render AWS error info safely. |
catalogs/catalog-glue/src/test/java/org/apache/gravitino/catalog/glue/TestGlueExceptionConverter.java |
Adds unit tests validating enriched fallback messages and unchanged recognized exception mappings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSH2qgg3eHh7acHzUkHrS4
…sages Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSH2qgg3eHh7acHzUkHrS4
Code Coverage Report
Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Append the AWS error code and message to the exception
GlueExceptionConverterreturns from its fallback branch, leaving the recognised branches and all call sites unchanged.Why are the changes needed?
The fallback branch reported every failure as
Glue error: <object>and discarded the AWS message, so an operator hitting anAccessDeniedExceptioncould not tell which permission was missing or on which resource.Fix: #12990
Does this PR introduce any user-facing change?
Glue error messages now carry the AWS error code and message, which name the IAM principal and resource.
How was this patch tested?
Unit tests for the enriched message, the fallbacks when AWS supplies no detail, and the unchanged branches.