add a check for error in response
add a check for error in response

the net/http packages doesn't return an error if the request itself
returns an Error code. As such, the decoder will try to detect errors,
which will return a decoded error across the response type. At this
point the middlewarer, will try to cast the response from the decoding
to an error type. If that succeeds, the error is returned as an error
in the endpoint.

Ayiga/go-kit-middlewarer