If no onerror option is present, or if it is not callable, does
nothing.
If the request is not an Http\Request, casts it to one prior to invoking
the error handler.
If the response is not an Http\Response, casts it to one prior to invoking
the error handler.