AMI-545 Properly respond to an error
AMI-545 make json not write
AMI-545 can't send headers after proxy, unfortunately.
Merge pull request #9 from SplunkStorm/AMI-545_proxy_error_handling

Ami 545 proxy error handling