mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 02:18:39 +08:00
If an HTTP request fails due to a connection failure or a timeout, do not convert the error to the more generic http_request_failed.
This commit is contained in:
parent
ad08fbad5b
commit
3ce7c78d36
@ -575,6 +575,12 @@ ACTOR Future<Reference<HTTP::Response>> doRequest_impl(Reference<BlobStoreEndpoi
|
||||
if(r && r->code == 401)
|
||||
throw http_auth_failed();
|
||||
|
||||
if(err.present()) {
|
||||
int code = err.get().code();
|
||||
if(code == error_code_timed_out || code == error_code_connection_failed)
|
||||
throw err.get();
|
||||
}
|
||||
|
||||
throw http_request_failed();
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ ERROR( http_not_accepted, 1519, "HTTP request not accepted" )
|
||||
ERROR( checksum_failed, 1520, "A data checksum failed" )
|
||||
ERROR( io_timeout, 1521, "A disk IO operation failed to complete in a timely manner" )
|
||||
ERROR( file_corrupt, 1522, "A structurally corrupt data file was detected" )
|
||||
ERROR( http_request_failed, 1523, "HTTP response code indicated failure" )
|
||||
ERROR( http_request_failed, 1523, "HTTP response code not received or indicated failure" )
|
||||
ERROR( http_auth_failed, 1524, "HTTP request failed due to bad credentials" )
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user