LongerDude opened a new pull request, #9397:
URL: https://github.com/apache/gravitino/pull/9397

   ### What changes were proposed in this pull request?
   
   Introduced a null check in the addPartitions resource method within 
PartitionOperations.java, It throws IllegalArgumentException, expanded the try 
scope to cover the check as well.
   A new unit test, testAddPartitionWithNullPartitions(), for fix validation.
   
   
   ### Why are the changes needed?
   
   Currently, if the request or its partition are null, the result is an NPE, 
it bypassed the intended error mapping logic and was treated as an unexpected 
server error, resulting in an 500 Internal Server Error response.
   
   Fix: #9317 
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   
   Added testAddPartitionWithNullPartitions() to test suit and executed these:
    ./gradlew :common:compileJava
   ./gradlew :common:test 
   ./gradlew :server:test
   All builds/tests were successful. 
   
   


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