This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Early Exception Issue #54
Comments
Can you not load your |
Tried that. Doesn't work cause the exception stops the whole bootstrap process in its tracks. No standard error routing, just kaput. |
Perhaps this means modifying the factory in which |
This also means that console routes fail. We now have a single application split into multiple instances simply to bypass the MvcAuth component which is terrible. |
This repository has been closed and moved to laminas-api-tools/api-tools-mvc-auth; a new issue has been opened at laminas-api-tools/api-tools-mvc-auth#18. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Not sure if this is even solvable since the component and its associated database connections (from OAuth) are required early, but here's the issue:
As any good developer should have, we have extensive error reporting and logging in place, emails, sms messages, etc and we have wrapped this logic into a module. But in this case, we had no notice of a critical error.
Our database server went away. The MvcAuth component attempts to retrieve a DB instance from the OAuth component on Bootstrap. Since the database server went offline, it rightly threw an exception. However, since this all occurred on bootstrap, the code in our ErrorReporter module never executed and the user was greeted with a blank white page. Since this occurred on bootstrap we couldn't route the user to a pretty "Whoops" page nor were we alerted.
The only solution at this time was to wrap the contents of public/index.php in a try catch statement, code out some error reporting and issue a die() statement to the user. Furthermore, because this all happens on bootstrap, the error occurs on pages where the DB connector and the Auth aren't even required.
In my opinion, this instantiation and configuration should happen elsewhere in the event chain so that the developer can programmatically and intelligently handle such errors.
The text was updated successfully, but these errors were encountered: