In some instances (where an ingress redirects 4xx errors for instance), the response by the server on error will not necessarily be neatly JSON formatted.
This causes pgweb to halt loading the page on a jQuery error.
This PR adds a trycatch statement to catch parseJSON errors and resume code execution on a failed API call.
In some instances (where an ingress redirects 4xx errors for instance), the response by the server on error will not necessarily be neatly JSON formatted.
This causes pgweb to halt loading the page on a jQuery error. This PR adds a
try
catch
statement to catchparseJSON
errors and resume code execution on a failed API call.