code: function (err) {
                  var responseOptions = new ResponseOptions({
                      body: err,
                      type: ResponseType.Error,
                      status: _xhr.status,
                      statusText: _xhr.statusText,
                  });
                  if (baseResponseOptions != null) {
                      responseOptions = baseResponseOptions.merge(responseOptions);
                  }
                  responseObserver.error(new Response(responseOptions));
              }
docs: error event handler