proudmonkey / AutoWrapper

A simple, yet customizable global exception handler and Http response wrapper for ASP.NET Core APIs.
MIT License
679 stars 82 forks source link

Always hide isError in response #111

Closed utkugenel closed 3 years ago

utkugenel commented 3 years ago

{ "isError": true, "error": { "message": "Error msg." } }

It would be nice to hide isError parameter. If http status code is not 200 then it's an error. I don't need to check isError parameter.

{ "error": { "message": "Error msg." } }

proudmonkey commented 3 years ago

The isError attribute should be hidden by default since v4.3.1. It was still added as part of the error response because others might still find it useful aside from looking into StatusCodes.

arhen commented 3 years ago

The isError attribute should be hidden by default since v4.3.1. It was still added as part of the error response because others might still find it useful aside from looking into StatusCodes.

Yah, I found it very useless when using UnitTest. Expect Json structure with consistency among all status code is a standard good communicating data between server/clients.