ProblemDetails and FluentValidation
Im having issues returning/throwing a custom exception made with ProblemDetails.
Im using FluentValidation to validate the input, and then i want to throw the custom exception whenever data isn't valid.
I'll attach code snippets of relevant classes. Hopefully some of you, can see through my problem 🙂 Thanks in advance
3 Replies
As of now i get an Internal server Error when i try to force the error by requesting with bad data
I've set up fluent validation using the documentation from here -> https://docs.fluentvalidation.net/en/latest/aspnet.html
usually we return a 400 ourselves and the validationresult
Yes thank you, i found the solution. And it was exactly this approach! 🙂