product-is icon indicating copy to clipboard operation
product-is copied to clipboard

SCIM API returns 500 for invalid request body

Open Avarjana opened this issue 1 year ago • 1 comments

Describe the issue:

SCIM patch operation will return 500 when operations key is sent without the uppercase O as in Operations. Docs should be corrected as well: [Doc]

How to reproduce:

  • Try a sample SCIM API request as follows with operations key instead of Operations
curl -L -X PATCH 'https://api.asg.io/scim2/Roles/5831857c-e402-4758-b5e2-a0710fc604b2' -H 'Content-Type: application/json' -H 'Authorization: Basic YWRtaW46YWRtaW4=' -H 'Cookie: atbv=******' -d '{
    "schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
    "operations": [
        {
            "op": "remove",
            "path": "users[value eq 75b62139-e819-46ea-b0e4-75e2b24c8804]"
        }
    ]
}'

Expected behavior:

Response should be 400 instead of 500.

Avarjana avatar Feb 06 '24 10:02 Avarjana