EduardoPires / EquinoxProject

Web Application ASP.NET 8 using Clean Architecture, DDD, CQRS, Event Sourcing and a lot of good practices
http://equinoxproject.azurewebsites.net/
MIT License
6.39k stars 1.6k forks source link

Feature Request: ProblemDetails #148

Closed brunobritodev closed 4 years ago

brunobritodev commented 4 years ago

There is a RFC about default response type for API's in case of error.

Abstract This document defines a "problem detail" as a way to carry machine- readable details of errors in a HTTP response to avoid the need to define new error response formats for HTTP APIs.

And Microsoft has a default implementation in ASP.NET Core, ProblemDetails

So instead return a custom object in BadRequest, it could return a ProblemDetails.

Why? Support best practices

EduardoPires commented 4 years ago

Done at #161