Skip to content
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

Catch 5 xx error codes #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mbueti
Copy link

@mbueti mbueti commented Jul 7, 2017

All classes of 5XX errors should be caught, to handle cases where the sixpack server becomes unavailable (502) or times out (502). Because certain web servers, especially nginx, return HTML pages on certain classes of error code, fail gracefully if/when JSON.parse throws an exception, rather than crashing the thread.

mbueti added 3 commits July 7, 2017 14:00
-If the sixpack server goes away for any reason, you may receive a 502
or 503 error response
-nginx often returns these as html pages, which JSON.parse will crash
while parsing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant