Throw newrelic error on HTTP 500

* throw newrelic error on http 500
* tiny refactor http request