Updated the error reporting urls to only return errors as JSON if that is what the request type is for easier debugging.