You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LeftAndMain::handleRequest() is catching ValidationException then using $e->getMessage() and using that as the error message for the HTTP response, which could be then displayed to a CMS author.
ValidationExceptions are intended for developers and not for CMS authors. What is really should be happening is the ValidationResult is extracted from the ValidationException and its message is shown.
However we don't actually currently know what contexts this code path is even triggered, and there may be a reason which makes doing this difficult e.g. there are multiple errors in the Validation result but we should only display the first message.
Acceptance criteria
LeftAndMain::handleRequest() no longer relies on the exception message
The condition that adds context to the validation exception message is removed, as that information should always be provided where available.
The text was updated successfully, but these errors were encountered:
LeftAndMain::handleRequest() is catching ValidationException then using $e->getMessage() and using that as the error message for the HTTP response, which could be then displayed to a CMS author.
ValidationExceptions are intended for developers and not for CMS authors. What is really should be happening is the ValidationResult is extracted from the ValidationException and its message is shown.
However we don't actually currently know what contexts this code path is even triggered, and there may be a reason which makes doing this difficult e.g. there are multiple errors in the Validation result but we should only display the first message.
Acceptance criteria
LeftAndMain::handleRequest()
no longer relies on the exception messageThe text was updated successfully, but these errors were encountered: