-
-
Notifications
You must be signed in to change notification settings - Fork 773
Implement RFC 7807 to support Problem Details in bad validation requests #578
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
Conversation
…he RFC 7807 specification.
|
Seems reasonable. @onovotny? |
| { | ||
| public class ProblemDetails | ||
| { | ||
| public Dictionary<string, string[]> Errors { get; set; } = new Dictionary<string, string[]>(); |
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.
@paulcbetts any thoughts on using the concrete type here vs an IDictionary<string,string> or IReadOnlyDictionary<string, string>?
|
@paulcbetts LGTM with the one style question design question you. |
|
@faniereynders Would you please add/update relevant documentation to cover this scenario? |
|
@onovotny certainly, are you referring to the documentation in the code itself? Please point me to the specific place, I'm new here :) |
|
Hi @faniereynders there are two things:
Please add them to this PR and we can merge them together.
|
|
@onovotny I've updated the docs, hope it's all good now? |
|
|
||
| namespace Refit | ||
| { | ||
| public class ProblemDetails |
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.
Please add a doc comment to the type itself
|
@faniereynders Looks like one missing doc comment and then we can merge |
|
@onovotny oops! Fixed it now :) |
Added support for handling validation-based exceptions according to the RFC 7807 specification.
A new exception
ValidationApiExceptionderived fromApiExceptionis introduced and allows one to catch specific validation exceptions in a declarative way:Resolved #470