Split error handling from response handling.

Also DRY'd up the response handlers with injectable parsers.
Added an integration test for receiving errors when using JSON simple mode.