patricklucas opened a new pull request #9737:
URL: https://github.com/apache/pulsar/pull/9737
If no `messageId` param is included in the PUT request, an NPE is thrown
down the stack. This change validates that `messageId` is non-null,
returning a 400 otherwise.
Fixes #9700
### Motivation
See commit message above.
### Modifications
Add null check on `messageId` param on admin v2 API handler for triggering
an offload operation.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- Added test that passing a null `messageId` to this method results in a
`RestException` with an HTTP 400 response.
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): no
- The public API: no
- The schema: no
- The default values of configurations: no
- The wire protocol: no
- The rest endpoints: only added validation
- The admin cli options: no
- Anything that affects deployment: no
### Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not documented
- If a feature is not applicable for documentation, explain why? this API
is not documented
- If a feature is not documented yet in this PR, please create a followup
issue for adding the documentation (should I do this?)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]