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
At this point, we receive an error situation from the kernel error listeners. This is the famous file with the longest if/elseif construction in history. Where certain exception types are matched with a custom error report.
They are then redirected to the FeedbackController who in turn renders a custom twig error template. Before doing so, twig functions are used to gather important error details. The Feedback Twig extension is a good example of this. It uses the Corto application object to load the feedback information from the session.
Needless to say. This setup can be improved upon. And #107565968 is an important part of doing so.
Instead of waiting for Corto to become obsolete. We can start with cleaning up technical debt in the way we now render the error templates.
A first effort was undertaken to fix this issue. The remnants can be found in: the optimize-error-routing feature branch.
In short, the following change was proposed and partly executed. But ended due to scope creep:
Routing configuration in feedback.yml is amended with additional route parameters. Being a page identifier and the expected HTTP error code.
The page identifier should be used to load the custom error message and page title from the translations file.
The error code will be used in the response to set the appropriate error code.
Any FeedbackController routes that do custom logic can be kept, all other routes should be updated to the generic error feedback route (already implemented in the branch)
Those errors using the generic route can be rid of their custom twig template. And a generic twig template should be introduced.
Some additional complexion lies in the retrieval of the feedback information. A new helper should be introduced. Tasked with retrieving this information from the Corto application session. This was partly implemented in the feature branch.
The custom translations for the error pages need to be translated. In doing so, the organization noun and other translation overrides must be applied. This was previously done in a twig extension of the translation function. This might need to move?
Greatest reason for not doing these tasks under the boyscout rule is the amount of changes required to apply this change. Additional tests, updating of tests, and rigorous user testing are required when applying this change.
The text was updated successfully, but these errors were encountered:
This issue is imported from pivotal - Originaly created at Aug 20, 2019 by Michiel Kodde
At this point, we receive an error situation from the kernel error listeners. This is the famous file with the longest if/elseif construction in history. Where certain exception types are matched with a custom error report.
They are then redirected to the FeedbackController who in turn renders a custom twig error template. Before doing so, twig functions are used to gather important error details. The
Feedback
Twig extension is a good example of this. It uses the Corto application object to load the feedback information from the session.Needless to say. This setup can be improved upon. And #107565968 is an important part of doing so.
Instead of waiting for Corto to become obsolete. We can start with cleaning up technical debt in the way we now render the error templates.
A first effort was undertaken to fix this issue. The remnants can be found in: the optimize-error-routing feature branch.
In short, the following change was proposed and partly executed. But ended due to scope creep:
Greatest reason for not doing these tasks under the boyscout rule is the amount of changes required to apply this change. Additional tests, updating of tests, and rigorous user testing are required when applying this change.
The text was updated successfully, but these errors were encountered: