Pass errors in the http response to error handler. Close #603.