Sanket Shelar created RANGER-5724:
-------------------------------------

             Summary: Grant API returns 200 OK for null payload
                 Key: RANGER-5724
                 URL: https://issues.apache.org/jira/browse/RANGER-5724
             Project: Ranger
          Issue Type: Bug
          Components: Ranger
    Affects Versions: 3.0.0
            Reporter: Sanket Shelar
            Assignee: Sanket Shelar


When invoking the Grant API with a null request payload, the API returns 200 
OK, whereas it should return a Bad Request (400) with an appropriate validation 
error.

*Endpoints:*
POST /service/plugins/services/grant/\{service}

POST /service/plugins/secure/services/grant/\{service}



*Steps to Reproduce:*
 # Execute the following curl command without a request body:
 
curl -k -X POST \
'http://localhost:6080/service/plugins/services/grant/cm_hive'
 
{{}}
 # Repeat the same test for:
POST /service/plugins/secure/services/grant/cm_hive
 
{{}}
 # Observe the HTTP response status.

 

*Actual Result:*
 * Both APIs return *200 OK* even when the request payload is null.

*Expected Result:*
 * API should return {*}400 Bad Request{*}.

 * Proper validation error message should be returned indicating 
missing/invalid request payload.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to