yuqi1129 opened a new issue, #14581:
URL: https://github.com/apache/gravitino/issues/14581

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   Lance REST maps Jersey routing exceptions for unsupported methods or media 
types to its internal-error response (HTTP 500 / code 18). These should retain 
HTTP 405/406/415; a 405 response must retain its Allow header.
   
   Registering a table with a missing/null location also reaches property 
construction instead of request validation and can return HTTP 500. The 
registration validator currently does nothing.
   
   ### Error message and/or stacktrace
   
   Unsupported requests can return code 18 even when the original exception 
reports HTTP 405 Method Not Allowed. Missing location can raise 
`NullPointerException: null value in entry: location=null`.
   
   ### How to reproduce
   
   - Send an unsupported HTTP method to a Lance namespace/table route.
   - Request an unsupported response media type or send an unsupported request 
Content-Type.
   - POST `/lance/v1/table/{id}/register` with `{}` (no location).
   
   ### Additional context
   
   Keep routing status/header handling local to the Lance mapper, use the Lance 
invalid-input error envelope, and validate the registration body/location 
before accessing the namespace backend. Existing valid registrations and 
authentication/error-detail policies should remain compatible.
   


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