jerryshao commented on issue #10171:
URL: https://github.com/apache/gravitino/issues/10171#issuecomment-6678493124
I checked current `main` (`a93aa73ead`) and all seven endpoints listed in
this issue already reject a null request body before dereferencing it:
- `TableOperations.createTable`
- `FilesetOperations.createFileset`
- `FunctionOperations.registerFunction`
- `ModelOperations.registerModel`
- `SchemaOperations.createSchema`
- `JobOperations.registerJobTemplate`
- `JobOperations.runJob`
Each one now does `if (request == null)` first, logs a warning, and returns
`IllegalArgumentException("Request body cannot be null")` through
`ExceptionHandlers`, which gives a 400 instead of an uncaught NPE. This was
done in #12791 (for #12788), together with #12770 (`createView`). Null-body
test cases also exist in the matching REST test classes.
So this issue appears to be resolved on `main`. @shaojunying, unless you
have remaining work here, I suggest closing this issue and PR #10182, since its
changes are now covered.
--
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]