Skip to content

HTTP status in errors is an int and not a JSON string as defined by the spec #834

@palpfiction

Description

@palpfiction

Hello!

First of all I wanted to thank you for all the work in the library: it's a wonderful piece of software.

While having an an Okta app reviewed we got some feedback about the error responses we are sending, complaining about the status property (HTTP status code) being an integer and not an string. It came to me as a surprise, but then I looked at the SCIM RFC and indeed, it specifies that the HTTP status code has to be a JSON string: see Section 3.12. of RFC 7644.

My question would be if this has been raised before (I didn't see any issues related) or if it was considered at some point and just decided to use an integer instead.

We can probably change the behavior by converting status to string inside setAttribute here, but I'm unsure if that will break consumers of the library. Do you know of a way we can "patch" this locally in an easy way?

Thank you very much!


Current behavior

{
     "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
     "detail":"Resource 2819c223-7f76-453a-919d-413861904646 not found",
     "status": 404
}

Expected behavior

{
     "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
     "detail":"Resource 2819c223-7f76-453a-919d-413861904646 not found",
     "status": "404"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions