{"action":"created","issue":{"url":"https://api.github.com/repos/amrav/chai/issues/2","labels_url":"https://api.github.com/repos/amrav/chai/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/amrav/chai/issues/2/comments","events_url":"https://api.github.com/repos/amrav/chai/issues/2/events","html_url":"https://github.com/amrav/chai/pull/2","id":99714055,"number":2,"title":"Add the maintenance message.","user":{"login":"icyflame","id":3668034,"avatar_url":"https://avatars.githubusercontent.com/u/3668034?v=3","gravatar_id":"","url":"https://api.github.com/users/icyflame","html_url":"https://github.com/icyflame","followers_url":"https://api.github.com/users/icyflame/followers","following_url":"https://api.github.com/users/icyflame/following{/other_user}","gists_url":"https://api.github.com/users/icyflame/gists{/gist_id}","starred_url":"https://api.github.com/users/icyflame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icyflame/subscriptions","organizations_url":"https://api.github.com/users/icyflame/orgs","repos_url":"https://api.github.com/users/icyflame/repos","events_url":"https://api.github.com/users/icyflame/events{/privacy}","received_events_url":"https://api.github.com/users/icyflame/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-07T19:34:52Z","updated_at":"2015-08-07T22:41:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/amrav/chai/pulls/2","html_url":"https://github.com/amrav/chai/pull/2","diff_url":"https://github.com/amrav/chai/pull/2.diff","patch_url":"https://github.com/amrav/chai/pull/2.patch"},"body":"@amrav Great work with this module!\r\n\r\nIncidentally, I tried it around 0020 and figured out that the API is not operational in this time period.\r\n\r\nI believe that this error message will make life easier for a lot of users! :smile: "},"comment":{"url":"https://api.github.com/repos/amrav/chai/issues/comments/128849485","html_url":"https://github.com/amrav/chai/pull/2#issuecomment-128849485","issue_url":"https://api.github.com/repos/amrav/chai/issues/2","id":128849485,"user":{"login":"amrav","id":1186303,"avatar_url":"https://avatars.githubusercontent.com/u/1186303?v=3","gravatar_id":"","url":"https://api.github.com/users/amrav","html_url":"https://github.com/amrav","followers_url":"https://api.github.com/users/amrav/followers","following_url":"https://api.github.com/users/amrav/following{/other_user}","gists_url":"https://api.github.com/users/amrav/gists{/gist_id}","starred_url":"https://api.github.com/users/amrav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amrav/subscriptions","organizations_url":"https://api.github.com/users/amrav/orgs","repos_url":"https://api.github.com/users/amrav/repos","events_url":"https://api.github.com/users/amrav/events{/privacy}","received_events_url":"https://api.github.com/users/amrav/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T22:41:22Z","updated_at":"2015-08-07T22:41:22Z","body":"Hi @icyflame, thanks for the PR. Having better error messages when the site is down makes sense. Unfortunately the way this PR implements it doesn't quite work for a couple of reasons. First, if you run the script on a machine whose local time doesn't match the Indian Railways server's time, the error message may display incorrectly, or not at all. This can happen because of a clock synchronisation issue, or even because the script is being run in a different time zone. Second, the Indian Railways website may or may not honour the scheduled downtime from 2330 to 0330, and it would be much nicer to scan the returned HTML for any error messages, and display them, than to rely on the downtime schedule. This way we can be more robust to other kinds of errors too, even ones that occur during the middle of the day.\r\n\r\nWould you consider rewriting this PR?"}}