AutoWrapper icon indicating copy to clipboard operation
AutoWrapper copied to clipboard

How to use Custom Response Schema while working with Clean Architecture

Open sabkaraja opened this issue 3 years ago • 0 comments

Hi I am using https://github.com/jasontaylordev/CleanArchitecture which has an ApiExceptionFilterAttribute that trapped my Validation Exceptions (and errors dictionary).

After enabling AutoWrapper, all I get is a generic { "message": "One or more validation failures have occurred." }

My business logic is in the Application project. The FluentValidations throw the validation errors which are caught by ValidationBehavior & raise as ValidationException. I saw some of the AutoWrapperOptions to use UseCustomExceptionFormat & CustomSchema. Does it allow me to catch the ValidationException

How do I get AutoWrapper to return message, error dictionary & statusCode?

sabkaraja avatar May 14 '22 06:05 sabkaraja