Skip to content

Commit

Permalink
doc: mention that null values are stripped from problem details
Browse files Browse the repository at this point in the history
  • Loading branch information
g0di committed Aug 5, 2024
1 parent 7eb740d commit c64fff1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ Note that in this example I've provided a custom `type` property but this might

> Likewise, truly generic problems -- i.e., conditions that might apply to any resource on the Web -- are usually better expressed as plain status codes. For example, a "write access disallowed" problem is probably unnecessary, since a 403 Forbidden status code in response to a PUT request is self-explanatory.
Also note that you can additional properties to the `ProblemResponse` object like `headers` or `instance`. Any extra properties will be added as-is in the returned Problem Details object (like the `user_id` in this example)
Also note that you can additional properties to the `ProblemResponse` object like `headers` or `instance`. Any extra properties will be added as-is in the returned Problem Details object (like the `user_id` in this example).

Last but not least, any `null` values are stripped from returned Problem Details object.

## Returning HTTP errors as Problem Details

Expand Down

0 comments on commit c64fff1

Please sign in to comment.