feat(validation): include error messages in ValidationFailed exception message#2203
feat(validation): include error messages in ValidationFailed exception message#2203mgalexandre wants to merge 2 commits into
Conversation
|
I don't think this is the right thing to do, honestly. Appending the JSON-encoded message array seems rough around the edges. In what situations did you need the |
|
I've reworked it to do two things:
|
|
Right, didn't take a look at the original issue, thanks @mgalexandre @brendt, in what situations do you need the message to contain the actual errors? I do think the context, as suggested by Neo, is more suited here |
|
Thanks, yeah that's definitely and issue. Then I believe our exception renderer should be responsible for that instead of hijacking the exception message. Maybe by showing the context for all exceptions, or by special-casing |

1. Implements
ProvidesContext, exposing the errors as structured context, so they show up in log context viaLoggingExceptionReporterand on the development exception page, the same pattern asQueryWasInvalid,EncryptionFailed, andProcessExecutionWasForbidden.2. Appends the failures to the message in a human-readable format:
The message stays untouched (
Validation failed.) when there are no error messages.Fixes #2189