LibRequests+RequestServer: Add an error code for CURLE_PARTIAL_FILE
This commit is contained in:
parent
d3fef8a460
commit
884efef99d
2 changed files with 5 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ enum class NetworkError {
|
|||
SSLHandshakeFailed,
|
||||
SSLVerificationFailed,
|
||||
MalformedUrl,
|
||||
IncompleteContent,
|
||||
InvalidContentEncoding,
|
||||
RequestServerDied,
|
||||
CacheReadFailed,
|
||||
|
|
@ -44,6 +45,8 @@ constexpr StringView network_error_to_string(NetworkError network_error)
|
|||
return "SSL verification failed"sv;
|
||||
case NetworkError::MalformedUrl:
|
||||
return "The URL is not formatted properly"sv;
|
||||
case NetworkError::IncompleteContent:
|
||||
return "Connection was closed before entire response was received"sv;
|
||||
case NetworkError::InvalidContentEncoding:
|
||||
return "Response could not be decoded with its Content-Encoding"sv;
|
||||
case NetworkError::RequestServerDied:
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ Requests::NetworkError curl_code_to_network_error(int code)
|
|||
return Requests::NetworkError::SSLVerificationFailed;
|
||||
case CURLE_URL_MALFORMAT:
|
||||
return Requests::NetworkError::MalformedUrl;
|
||||
case CURLE_PARTIAL_FILE:
|
||||
return Requests::NetworkError::IncompleteContent;
|
||||
case CURLE_BAD_CONTENT_ENCODING:
|
||||
return Requests::NetworkError::InvalidContentEncoding;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue