lasdf1234 opened a new pull request, #12999:
URL: https://github.com/apache/gravitino/pull/12999
### What changes were proposed in this pull request?
- Add `ExceptionMessages` helper to append the underlying cause message when
wrapping exceptions.
- Update catalog catch-all wraps (Kafka, Glue, Hive/HMS, Fileset, Model,
Lance, Doris, Paimon, Hadoop FS) to use it.
- Kafka: map invalid configuration on create/alter to
`IllegalArgumentException` (4xx).
- Glue: keep upstream text in default errors; map `AccessDeniedException` to
`ForbiddenException`.
- Add unit tests for `ExceptionMessages` and `GlueExceptionConverter`.
### Why are the changes needed?
Connectors were replacing actionable upstream errors with generic messages.
Operators only saw the stack trace. Client-caused failures were also returned
as 500.
Fix: #12998
### Does this PR introduce _any_ user-facing change?
Yes. Failed catalog operations may return richer `message` text (upstream
reason included). Some Kafka invalid-config and Glue access-denied failures map
to 400/403 instead of 500.
### How was this patch tested?
- Unit tests: `TestExceptionMessages`, `TestGlueExceptionConverter`
- Suggested local run:
`./gradlew spotlessApply :common:test --tests
org.apache.gravitino.utils.TestExceptionMessages :catalogs:catalog-glue:test
--tests org.apache.gravitino.catalog.glue.TestGlueExceptionConverter -PskipITs`
Made with [Cursor](https://cursor.com)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]