Skip to content

Improve status code handling #283

Description

@jpraet

Extracted from #246.

When unmarshalling a "known" problem type, we currently ignore the "status" property of the problem payload. The status code is hardcoded in the constructor. What if the "status" property in the problem payload was different? Could we log a warning?

What if the "status" property in the problem payload was different from the status code in the HTTP header? Could we log a warning?

For "unknown" problem types, they are unmarshalled to a DefaultProblem instance. For those, we do take the "status" property from the problem payload. If the problem payload doesn't contain a "status" property, it is considered to be 0. Should we log a warning when that happens?
And again, what if its "status" property in the problem payload was different from the status code in the HTTP header? Could we log a warning?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions