SimpleIdServer icon indicating copy to clipboard operation
SimpleIdServer copied to clipboard

Server error occurs when trying to get Groups are not presented in the scheme

Open andreidabryian opened this issue 3 years ago • 1 comments

Steps to reproduce:

Send Get request to https://{{Server}}{{Port}}/Groups

Result:

500 server error is returned in the response with the body:

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:Error"
    ],
    "status": "500",
    "scimType": "internalServerError",
    "detail": "System.NullReferenceException: Object reference not set to an instance of an object.\n   at SimpleIdServer.Scim.Api.BaseApiController.InternalSearch(SearchSCIMResourceParameter searchRequest)"
}

Expected Result:

404 status code is returned as Groups are not present in the current scheme. 404 status code is currently returned for all other not existing urls (/test, as example)

Reproducible for other types of requests: Post, Put…

andreidabryian avatar Sep 15 '22 08:09 andreidabryian

Hello,

Good remark :) The issue is fixed in the master branch. If the ResourceType doesn't exist in the database then 404 is always returned.

KR,

SID

simpleidserver avatar Sep 15 '22 08:09 simpleidserver