Open tommeagher opened 8 years ago
So the platform is supposed to send a format-specific error response (JSON for JSON requests, JS for JS requests, or HTML for everything else). If it's sending HTML to an upload.json
hit, then either nginx is throwing the 500 upstream, or Rails is fouling up the format negotiation. The former seems more likely. We should investigate and fix on DC why this was returning HTML, but yeah, you may want to protect against receiving non-JSON from the API just in case.
Here's the stack trace:
I believe this line is the culprit, because if there isn't a proper JSON response from DocCloud API (as in a 200 status), then it can't convert the response (ie - HTML) to a dict.
Testing a fix now and hope to send a PR shortly.