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

   ### What changes were proposed in this pull request?
   
   - Return HTTP 501 for `UnsupportedOperationException` handled by REST 
resources.
   - Return HTTP 400 when statistics endpoints receive a non-table object type.
   - Add a dedicated HTTP 405 helper and keep the authorization-disabled filter 
on 405.
   - Update the statistics OpenAPI contract and Java client tests.
   - Add tests for the 400, 405, and 501 behavior.
   
   ### Why are the changes needed?
   
   HTTP 405 means the request method is not supported by the target resource, 
but these failures use valid registered methods. The incorrect status misleads 
clients and monitoring and conflicts with the response body.
   
   Fix: #12879
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Unsupported REST operations now return HTTP 501, invalid statistics 
object types return HTTP 400, and authorization-disabled endpoints continue to 
return HTTP 405. The application error response payload remains compatible.
   
   ### How was this patch tested?
   
   - `./gradlew :server-common:test --tests 
org.apache.gravitino.server.web.TestUtils -PskipITs -PskipDockerTests=true`
   - `./gradlew :server:test --tests 
org.apache.gravitino.server.web.filter.TestAccessControlNotAllowedFilter 
--tests org.apache.gravitino.server.web.rest.TestStatisticOperations -PskipITs 
-PskipDockerTests=true`
   - `./gradlew :clients:client-java:test --tests 
org.apache.gravitino.client.TestSupportsStatistics --tests 
org.apache.gravitino.client.TestSupportsPartitionStatistics --tests 
org.apache.gravitino.client.TestRelationalCatalog -PskipITs 
-PskipDockerTests=true`
   - `./gradlew :docs:build -PskipITs -PskipDockerTests=true`


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