call the exception callback not the resp callback

The current response callback is called with an error if the statusCode of the response is not of value 200/201.

The pr changes the call from `resp(error)` to `exc(err)`.

Note: there are also coding style changes in the pr.