dynamic onError(AngelErrorHandler handler(AngelHttpException err, RequestContext req, ResponseContext res))

Registers a callback to run upon errors.

Source

onError(AngelErrorHandler handler) {
  _errorHandler = handler;
}