You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In certain cases, web servers can return 5XX errors that are not specifically 500. In our case, we're seeing 502 errors come through if the server becomes unavailable. With these errors, nginx servers return plain HTML documents.
Because sixpack checks strictly for 500 error codes, and then JSON parses the response body if status !== 500, 502 and 502 responses can cause an exception to be thrown, and the process thread to die.
The PR at #24 checks for all 5XX errors when receiving results, and try/catches the JSON parse, in case a non-son response is returned, making the library significantly more fault tolerant.
The text was updated successfully, but these errors were encountered:
In certain cases, web servers can return 5XX errors that are not specifically 500. In our case, we're seeing 502 errors come through if the server becomes unavailable. With these errors, nginx servers return plain HTML documents.
Because sixpack checks strictly for 500 error codes, and then JSON parses the response body if status !== 500, 502 and 502 responses can cause an exception to be thrown, and the process thread to die.
The PR at #24 checks for all 5XX errors when receiving results, and try/catches the JSON parse, in case a non-son response is returned, making the library significantly more fault tolerant.
The text was updated successfully, but these errors were encountered: