Hello,
ValidationFeature works well (validators are in an external assembly) but when I add a ServiceExceptionHandlers, it stops being fired and the request is handled by service even if validation should prevent it.
Is this a bug or is there another way to transform the returned error globally?
Thanks,
Olivier
ServiceExceptionHandlers.Add((httpReq, request, exception) => {
var error = DtoUtils.CreateErrorResponse(request, exception);
var httpError = error as HttpError;
if (httpError == null) return error;
var dtoError = httpError.Response as ErrorResponse;
if (dtoError == null) return error;
httpError.Response = new
{
dtoError.ResponseStatus.Message
};
return httpError;
});