lasdf1234 opened a new pull request, #14591:
URL: https://github.com/apache/gravitino/pull/14591
### What changes were proposed in this pull request?
Manual conflict-free backport of #14572 / `58ef9fd6ff` onto `branch-1.3`:
- Document **401** and **406** on the built-in IdP operations that exist on
`branch-1.3`.
- Narrow `IdpForbiddenErrorResponse` so it does not claim unauthenticated
callers receive 403; align the Forbidden example with
`SERVICE_ADMIN_REQUIRED_MESSAGE`.
- Return **400** (`Request body cannot be null`) for null JSON bodies on IdP
user/group write APIs instead of NPE **500**.
`branch-1.3` does not include `PUT /idp/users/{user}/enabled`, so that
operation from main is intentionally omitted (that is what conflicted in
#14590).
### Why are the changes needed?
Fixes #14571 and #14579 on the 1.3 line. Supersedes conflicted bot
cherry-pick #14590.
### Does this PR introduce _any_ user-facing change?
- Docs / OpenAPI contract updates for 401/406/Forbidden wording.
- IdP write APIs now return 400 instead of 500 when the request body is null.
### How was this patch tested?
- `./gradlew :plugins:idp-basic:test --tests
org.apache.gravitino.idp.web.rest.TestIdpOperations` (includes
`testNullRequestBodyReturnsBadRequest`)
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]