fix: curl error category

This commit is contained in:
yanlong.wang 2025-03-10 12:24:54 +08:00
parent 5f6cfdf280
commit 8a8ae10919
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -401,14 +401,15 @@ export class CurlControl extends AsyncService {
digestCurlCode(code: CurlCode, msg: string) {
switch (code) {
// 400 User errors
case CurlCode.CURLE_GOT_NOTHING:
case CurlCode.CURLE_COULDNT_RESOLVE_HOST:
case CurlCode.CURLE_REMOTE_ACCESS_DENIED: {
{
return new AssertionFailureError(msg);
}
// Retryable errors
case CurlCode.CURLE_REMOTE_ACCESS_DENIED:
case CurlCode.CURLE_RECV_ERROR:
case CurlCode.CURLE_GOT_NOTHING:
case CurlCode.CURLE_OPERATION_TIMEDOUT:
case CurlCode.CURLE_SSL_CONNECT_ERROR:
case CurlCode.CURLE_QUIC_CONNECT_ERROR: