-
Couldn't load subscription status.
- Fork 10.5k
Add additional ProblemDetails default types and titles #58101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional ProblemDetails default types and titles #58101
Conversation
|
Thanks @joegoldman2. This seems fine to me... @martincostello @captainsafia, do we have any policy for which statuses we include here? |
|
Not that I'm aware of - I guess as long as it's an official code in the RFC it should be fine? |
|
Yep, the Problem Details spec is very permissive about what status codes can be referenced in the payload (ref). The only thing it cautions about is that you make sure the status code in the Problem Details payload matches what is actually returned in the HTTP response (accounting for any proxies and whatnot). With that in mind, we might want to consider if we want to go ahead and support all the status codes or just the finite set added here. @joegoldman2 Was there a particular reason you chose this subset to add? |
I needed to use a few (not all I added to this PR) and realized that default values were missing. I decided to add all missing standard (from the RFC) statuses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I double checked and this does cover all the status codes currently under Client Error and Server Error in the RFC.
* Add additional ProblemDetails default types and titles * Fix unit test --------- Co-authored-by: joegoldman2 <[email protected]>
* Add additional ProblemDetails default types and titles * Fix unit test --------- Co-authored-by: joegoldman2 <[email protected]>
Description
This PR adds additional problem details titles and types for HTTP statuses 407, 410, 411, 413, 414, 416, 417, 421, 501, and 505.