justinmclean opened a new issue, #8082:
URL: https://github.com/apache/gravitino/issues/8082

   ### What would you like to be improved?
   
   In 
server/src/main/java/org/apache/gravitino/server/web/rest/PartitionOperations.java
 addPartitions is misisng request.validate() 
   
   Here's a test to show that:
   ```
     @Test
     public void testAddPartitionWithNullPartitions() {
       // Missing partitions should trigger request validation failure and 
return BAD_REQUEST.
       AddPartitionsRequest req = new AddPartitionsRequest(null);
       Response resp =
           target(partitionPath(metalake, catalog, schema, table))
               .request(MediaType.APPLICATION_JSON_TYPE)
               .accept("application/vnd.gravitino.v1+json")
               .post(Entity.entity(req, MediaType.APPLICATION_JSON_TYPE));
   
       Assertions.assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), 
resp.getStatus());
   
       ErrorResponse errorResp = resp.readEntity(ErrorResponse.class);
       Assertions.assertEquals(ErrorConstants.ILLEGAL_ARGUMENTS_CODE, 
errorResp.getCode());
     }
   ```
   
   
   ### How should we improve?
   
   add it.


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