mchades opened a new pull request, #14669:
URL: https://github.com/apache/gravitino/pull/14669

   ### What changes were proposed in this pull request?
   
   Map unhandled `IllegalArgumentException` in the authorization interceptor to 
HTTP 400, preserving the original error type and message. Add whitespace-only 
Catalog-name regressions at the interceptor and HTTP layers, and update the 
existing argument-error mapping test.
   
   ### Why are the changes needed?
   
   Argument validation can fail before the REST resource runs. The interceptor 
currently wraps these failures as HTTP 500 authorization errors.
   
   Fixes #14668
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. These argument errors now return HTTP 400 with code `1001` and their 
original details, instead of HTTP 500 with a generic internal-error message.
   
   ### How was this patch tested?
   
   - Confirmed all five affected interceptor regression cases fail before the 
fix.
   - `./gradlew :server:test --tests '*TestGravitinoInterceptionService' 
:clients:client-java:test --tests '*InvalidCatalogNameAuthorizationIT' --tests 
'*InvalidMetadataObjectTypeAuthorizationIT' -PskipWeb=true 
-PskipDockerTests=true` — 38 interceptor tests and 5 HTTP integration cases 
passed.
   - `./gradlew :server:spotlessCheck :clients:client-java:spotlessCheck` and 
`git diff --check` passed.
   


-- 
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]

Reply via email to