Prevent stack overflow when requesting plain JSON data

I had a problem with stack overflows when using this library. If we throw an error when this isn't a JSONP request then it will try to send the error to the client, at which point it loops endlessly trying to return error after error.