pratt4 opened a new pull request, #25865:
URL: https://github.com/apache/pulsar/pull/25865

   The WebSocket `ReaderHandler` currently returns HTTP 500 when the reader 
endpoint receives an invalid `messageId` query parameter.
   
   Invalid `messageId` values are client-side input errors, so the endpoint 
should return HTTP 400 Bad Request instead of HTTP 500 Internal Server Error.
   
   This can happen when:
   - the `messageId` is not valid Base64, for example 
`messageId=invalidMessageId`
   - the `messageId` is valid Base64 but cannot be deserialized into a valid 
Pulsar `MessageId`
   
   Fixes #25708
   
   ### Modifications
   
   - Updated `ReaderHandler#getMessageId()` to treat invalid `messageId` query 
parameters as `IllegalArgumentException`.
   - Updated `ReaderHandler` error handling to use the shared WebSocket error 
mapping instead of always returning HTTP 500.
   - Added regression coverage for invalid reader `messageId` values to verify 
that the endpoint returns HTTP 400.
   


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