pox
pox
CC#
Created by pox on 10/19/2022 in #help
Return a custom ProblemDetails from a controller. How should I do it?
There is BaseController.Problem but that creates a new problem details with some defaults.
Should I just do something like
return new ObjectResult(details)
{
ContentTypes = { "application/problem+json" },
StatusCode = details.Status,
};
return new ObjectResult(details)
{
ContentTypes = { "application/problem+json" },
StatusCode = details.Status,
};
1 replies
CC#
Created by pox on 8/11/2022 in #help
Swagger multiple error types
31 replies