{"action":"created","issue":{"url":"https://api.github.com/repos/mysociety/yournextmp-popit/issues/191","labels_url":"https://api.github.com/repos/mysociety/yournextmp-popit/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/mysociety/yournextmp-popit/issues/191/comments","events_url":"https://api.github.com/repos/mysociety/yournextmp-popit/issues/191/events","html_url":"https://github.com/mysociety/yournextmp-popit/pull/191","id":56909277,"number":191,"title":"Add middleware to handle errors better if PopIt is down","user":{"login":"mhl","id":7907,"avatar_url":"https://avatars.githubusercontent.com/u/7907?v=3","gravatar_id":"","url":"https://api.github.com/users/mhl","html_url":"https://github.com/mhl","followers_url":"https://api.github.com/users/mhl/followers","following_url":"https://api.github.com/users/mhl/following{/other_user}","gists_url":"https://api.github.com/users/mhl/gists{/gist_id}","starred_url":"https://api.github.com/users/mhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhl/subscriptions","organizations_url":"https://api.github.com/users/mhl/orgs","repos_url":"https://api.github.com/users/mhl/repos","events_url":"https://api.github.com/users/mhl/events{/privacy}","received_events_url":"https://api.github.com/users/mhl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-07T12:12:40Z","updated_at":"2015-02-07T12:14:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mysociety/yournextmp-popit/pulls/191","html_url":"https://github.com/mysociety/yournextmp-popit/pull/191","diff_url":"https://github.com/mysociety/yournextmp-popit/pull/191.diff","patch_url":"https://github.com/mysociety/yournextmp-popit/pull/191.patch"},"body":"If PopIt is being restarted, then we currently get a flurry of error\r\nemails and the users hitting the site then see an ugly Internal Server\r\nError page. This middleware catches ConnectionError (from requests)\r\nand HttpServerError 503 (from slumber) and presents an error page in the\r\nsite's style saying the service is temporarily down.\r\n\r\nPopIt and YourNextMP are being indepedently monitored by PopIt, so\r\nhopefully this shouldn't affect our awareness of the site being down.\r\n\r\nFixes #126"},"comment":{"url":"https://api.github.com/repos/mysociety/yournextmp-popit/issues/comments/73361908","html_url":"https://github.com/mysociety/yournextmp-popit/pull/191#issuecomment-73361908","issue_url":"https://api.github.com/repos/mysociety/yournextmp-popit/issues/191","id":73361908,"user":{"login":"mhl","id":7907,"avatar_url":"https://avatars.githubusercontent.com/u/7907?v=3","gravatar_id":"","url":"https://api.github.com/users/mhl","html_url":"https://github.com/mhl","followers_url":"https://api.github.com/users/mhl/followers","following_url":"https://api.github.com/users/mhl/following{/other_user}","gists_url":"https://api.github.com/users/mhl/gists{/gist_id}","starred_url":"https://api.github.com/users/mhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhl/subscriptions","organizations_url":"https://api.github.com/users/mhl/orgs","repos_url":"https://api.github.com/users/mhl/repos","events_url":"https://api.github.com/users/mhl/events{/privacy}","received_events_url":"https://api.github.com/users/mhl/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T12:14:53Z","updated_at":"2015-02-07T12:14:53Z","body":"The error page looks like:\r\n\r\n![popit-down-error](https://cloud.githubusercontent.com/assets/7907/6092064/ea081730-aec2-11e4-9606-02f02deedb0b.png)\r\n"}}