Skip to content

How to use Custom Response Schema while working with Clean Architecture #137

@sabkaraja

Description

@sabkaraja

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions