Add bad response handling

PTAL @astashov

Changes:
* Responses with a bad status now complete with completeError
* Added test for this