{"action":"created","issue":{"url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/54","labels_url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/54/comments","events_url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/54/events","html_url":"https://github.com/zfcampus/zf-mvc-auth/issues/54","id":52752129,"number":54,"title":"Early Exception Issue","user":{"login":"spectravp","id":272688,"avatar_url":"https://avatars.githubusercontent.com/u/272688?v=3","gravatar_id":"","url":"https://api.github.com/users/spectravp","html_url":"https://github.com/spectravp","followers_url":"https://api.github.com/users/spectravp/followers","following_url":"https://api.github.com/users/spectravp/following{/other_user}","gists_url":"https://api.github.com/users/spectravp/gists{/gist_id}","starred_url":"https://api.github.com/users/spectravp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spectravp/subscriptions","organizations_url":"https://api.github.com/users/spectravp/orgs","repos_url":"https://api.github.com/users/spectravp/repos","events_url":"https://api.github.com/users/spectravp/events{/privacy}","received_events_url":"https://api.github.com/users/spectravp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-12-23T16:07:05Z","updated_at":"2015-03-25T18:09:46Z","closed_at":null,"body":"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:\r\n\r\nAs 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. \r\n\r\nOur 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. \r\n\r\nThe 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. \r\n\r\nIn my opinion, this instantiation and configuration should happen elsewhere in the event chain so that the developer can programmatically and intelligently handle such errors.\r\n "},"comment":{"url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/comments/86153787","html_url":"https://github.com/zfcampus/zf-mvc-auth/issues/54#issuecomment-86153787","issue_url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/54","id":86153787,"user":{"login":"spectravp","id":272688,"avatar_url":"https://avatars.githubusercontent.com/u/272688?v=3","gravatar_id":"","url":"https://api.github.com/users/spectravp","html_url":"https://github.com/spectravp","followers_url":"https://api.github.com/users/spectravp/followers","following_url":"https://api.github.com/users/spectravp/following{/other_user}","gists_url":"https://api.github.com/users/spectravp/gists{/gist_id}","starred_url":"https://api.github.com/users/spectravp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spectravp/subscriptions","organizations_url":"https://api.github.com/users/spectravp/orgs","repos_url":"https://api.github.com/users/spectravp/repos","events_url":"https://api.github.com/users/spectravp/events{/privacy}","received_events_url":"https://api.github.com/users/spectravp/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T18:09:46Z","updated_at":"2015-03-25T18:09:46Z","body":"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 so terribly coded and untested, it was clearly a hack to get it going. "}}