How to handle a JSON request that doesn't return JSON?
===

In the good case my JSON endpoint will return a proper JSON response: `{status: "success"}`. However if my webserver 500 errors the 500 response body is HTML, which results in a SyntaxError if jQuery tries to parse it with `$.parseJSON`.

[This question](http://stackoverflow.com/questions/2756344/how-do-i-handle-a-json-request-returning-a-string-in-jquery?rq=1) suggests just removing the dataType param from the request.  I would rather not do that, is there a way to try/catch the SyntaxError thats raised by a non-JSON response?