Akanksha-kedia opened a new pull request, #18896:
URL: https://github.com/apache/pinot/pull/18896

   ## Description
   
   The `updateSchema` endpoint in `PinotSchemaRestletResource` was catching 
`SchemaBackwardIncompatibleException` but discarding the actual error details, 
returning only a generic message: `"Backward incompatible schema <name>. Only 
allow adding new columns"`.
   
   This made it very difficult for users to understand **why** their schema 
update was rejected. The exception itself already contains detailed information 
about incompatible field specifications, missing columns, primary key changes, 
and suggestions for fixing the issue — but this information was never surfaced 
to the user.
   
   After this fix, the error response includes the actual reason from 
`e.getMessage()`, giving users actionable information about what is 
incompatible and how to fix it.
   
   ## Related Issue
   
   Fixes #14787
   
   ## Changes Made
   
   - Modified `PinotSchemaRestletResource.updateSchema()` to include 
`e.getMessage()` in the error response for 
`SchemaBackwardIncompatibleException`, replacing the generic "Only allow adding 
new columns" message.
   - Added a test assertion in `PinotSchemaRestletResourceTest` to verify that 
backward-incompatible schema update errors include the actual incompatibility 
details.
   
   ## Testing Done
   
   - [x] Unit test updated to verify error message includes incompatibility 
details
   - [x] Spotless formatting passes
   - [x] Checkstyle passes
   - [x] Compilation verified
   
   ## Upgrade Notes
   
   None. This is a user-facing error message improvement only — no API or 
configuration changes.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to