In case the response from PandaStream can't be parsed as JSON instead of crashing with an exception return the raw body content. A better approach would be to convert the callbacks to the more modern callback(err, response) format to allow the code using the client to handle the error in a more elegant manner, but that may cause compatibility issues with older code using the client.