Commit 4442fe6f authored by Paweł Wegner's avatar Paweł Wegner

Request: don't set code to unauthorized on http library error.

parent 7179f4a5
......@@ -238,7 +238,8 @@ void Request<T>::send(RequestFactory factory, RequestCompleted complete,
this->reauthorize(response.http_code_, response.headers_)) {
this->reauthorize([=](EitherError<void> e) {
if (e.left()) {
if (e.left()->code_ != IHttpRequest::Aborted)
if (e.left()->code_ != IHttpRequest::Aborted &&
e.left()->code_ > 0)
return complete(
Error{IHttpRequest::Unauthorized, e.left()->description_});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment