-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Make it easier to return Problem Details responses for server errors #8537
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
Comments
I was looking for something like this today. Currently, there's no convenient way to return a problem details response with the ability to specify the title/detail/instance/etc. Methods like A Suggestion: also create a
All these things are currently done in the default |
BTW, I'm interested in implementing this, if there isn't someone already working on it. |
This is already done for you, if you use an |
Oh, nice! Thanks @khellang |
* Introduce ControllerBase.Problem and ValidationProblem overload that accepts optional parameters * Consistently use ClientErrorData when generating ProblemDetails * Clean-up InvalidModelStateResponseFactory initialization. Fixes #8537
* Introduce ControllerBase.Problem and ValidationProblem overload that accepts optional parameters * Consistently use ClientErrorData when generating ProblemDetails * Clean-up InvalidModelStateResponseFactory initialization. Fixes #8537
* Introduce ControllerBase.Problem and ValidationProblem overload that accepts optional parameters * Consistently use ClientErrorData when generating ProblemDetails * Clean-up InvalidModelStateResponseFactory initialization. Fixes #8537
* Add helper methods on ControllerBase to return ProblemDetails * Introduce ControllerBase.Problem and ValidationProblem overload that accepts optional parameters * Consistently use ClientErrorData when generating ProblemDetails * Clean-up InvalidModelStateResponseFactory initialization. Fixes #8537
Add a set of new Problem helper methods on
ControllerBase
, that populates aProblemDetails
type with relevant values for simple returning of errors through the MVC response pipeline, e.g.:@rynowak
The text was updated successfully, but these errors were encountered: