-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Early Exception Issue #18
Comments
Can you not load your Originally posted by @EMCP at zfcampus/zf-mvc-auth#54 (comment) |
Tried that. Doesn't work cause the exception stops the whole bootstrap process in its tracks. No standard error routing, just kaput. Originally posted by @spectravp at zfcampus/zf-mvc-auth#54 (comment) |
Perhaps this means modifying the factory in which Originally posted by @EMCP at zfcampus/zf-mvc-auth#54 (comment) |
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. Originally posted by @spectravp at zfcampus/zf-mvc-auth#54 (comment) |
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.
Originally posted by @spectravp at zfcampus/zf-mvc-auth#54
The text was updated successfully, but these errors were encountered: