libcurl-errors(3)
π NAME π
Okay bestie, this is the libcurl-errors(3) page: libcurl-errors β error codes in libcurl. It's giving reference manual, but make it make sense.
β¨ DESCRIPTION β¨
This man page includes most, if not all, available error codes in libcurl. Why they occur and possibly what you can do to fix the problem are also included. Lowkey essential reading when something goes sideways. π
π¦ CURLcode π¦
Almost all "easy" interface functions return a CURLcode error code. No matter what, using the curl_easy_setopt(3) option CURLOPT_ERRORBUFFER(3) is a good idea as it will give you a human readable error string that may offer more details about the cause of the error than just the error code. curl_easy_strerror(3) can be called to get an error string from a given CURLcode number.
CURLcode is one of the following:
CURLE_OK(0) β All fine. Proceed as usual. Slay. πCURLE_UNSUPPORTED_PROTOCOL(1) β The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn't use, it can be a misspelled protocol string or just a protocol libcurl has no code for.CURLE_FAILED_INIT(2) β Very early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental couldn't get done at init time.CURLE_URL_MALFORMAT(3) β The URL was not properly formatted.CURLE_NOT_BUILT_IN(4) β A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision. This means that a feature or option was not enabled or explicitly disabled when libcurl was built and in order to get it to function you have to get a rebuilt libcurl.CURLE_COULDNT_RESOLVE_PROXY(5) β Couldn't resolve proxy. The given proxy host could not be resolved.CURLE_COULDNT_RESOLVE_HOST(6) β Couldn't resolve host. The given remote host was not resolved.CURLE_COULDNT_CONNECT(7) β Failed toconnect()to host or proxy.CURLE_WEIRD_SERVER_REPLY(8) β The server sent data libcurl couldn't parse. This error code was known asCURLE_FTP_WEIRD_SERVER_REPLYbefore 7.51.0.CURLE_REMOTE_ACCESS_DENIED(9) β We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory.CURLE_FTP_ACCEPT_FAILED(10) β While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar.CURLE_FTP_WEIRD_PASS_REPLY(11) β After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned.CURLE_FTP_ACCEPT_TIMEOUT(12) β During an active FTP session while waiting for the server to connect, theCURLOPT_ACCEPTTIMEOUT_MS(3)(or the internal default) timeout expired.CURLE_FTP_WEIRD_PASV_REPLY(13) β libcurl failed to get a sensible result back from the server as a response to either aPASVor aEPSVcommand. The server is flawed.CURLE_FTP_WEIRD_227_FORMAT(14) β FTP servers return a 227-line as a response to aPASVcommand. If libcurl fails to parse that line, this return code is passed back.CURLE_FTP_CANT_GET_HOST(15) β An internal failure to lookup the host used for the new connection.CURLE_HTTP2(16) β A problem was detected in the HTTP2 framing layer. This is somewhat generic and can be one out of several problems, see the error buffer for details.CURLE_FTP_COULDNT_SET_TYPE(17) β Received an error when trying to set the transfer mode to binary or ASCII.CURLE_PARTIAL_FILE(18) β A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size.CURLE_FTP_COULDNT_RETR_FILE(19) β This was either a weird reply to aRETRcommand or a zero byte transfer complete.CURLE_QUOTE_ERROR(21) β When sending customQUOTEcommands to the remote server, one of the commands returned an error code that was 400 or higher (for FTP) or otherwise indicated unsuccessful completion of the command.CURLE_HTTP_RETURNED_ERROR(22) β This is returned ifCURLOPT_FAILONERROR(3)is setTRUEand the HTTP server returns an error code that is >= 400.CURLE_WRITE_ERROR(23) β An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.CURLE_UPLOAD_FAILED(25) β Failed starting the upload. For FTP, the server typically denied theSTORcommand. The error buffer usually contains the server's explanation for this.CURLE_READ_ERROR(26) β There was a problem reading a local file or an error returned by the read callback.CURLE_OUT_OF_MEMORY(27) β A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs. πCURLE_OPERATION_TIMEDOUT(28) β Operation timeout. The specified time-out period was reached according to the conditions.CURLE_FTP_PORT_FAILED(30) β The FTPPORTcommand returned error. This mostly happens when you haven't specified a good enough address for libcurl to use. SeeCURLOPT_FTPPORT(3).CURLE_FTP_COULDNT_USE_REST(31) β The FTPRESTcommand returned error. This should never happen if the server is sane.CURLE_RANGE_ERROR(33) β The server does not support or accept range requests.CURLE_HTTP_POST_ERROR(34) β This is an odd error that mainly occurs due to internal confusion.CURLE_SSL_CONNECT_ERROR(35) β A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others.CURLE_BAD_DOWNLOAD_RESUME(36) β The download could not be resumed because the specified offset was out of the file boundary.CURLE_FILE_COULDNT_READ_FILE(37) β A file given withFILE://couldn't be opened. Most likely because the file path doesn't identify an existing file. Did you check file permissions? πCURLE_LDAP_CANNOT_BIND(38) β LDAP cannot bind. LDAP bind operation failed.CURLE_LDAP_SEARCH_FAILED(39) β LDAP search failed.CURLE_FUNCTION_NOT_FOUND(41) β Function not found. A required zlib function was not found.CURLE_ABORTED_BY_CALLBACK(42) β Aborted by callback. A callback returned "abort" to libcurl.CURLE_BAD_FUNCTION_ARGUMENT(43) β A function was called with a bad parameter.CURLE_INTERFACE_FAILED(45) β Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address withCURLOPT_INTERFACE(3).CURLE_TOO_MANY_REDIRECTS(47) β Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit withCURLOPT_MAXREDIRS(3).CURLE_UNKNOWN_OPTION(48) β An option passed to libcurl is not recognized/known. Refer to the appropriate documentation. This is most likely a problem in the program that uses libcurl. The error buffer might contain more specific information about which exact option it concerns.CURLE_TELNET_OPTION_SYNTAX(49) β A telnet option string was illegally formatted.CURLE_GOT_NOTHING(52) β Nothing was returned from the server, and under the circumstances, getting nothing is considered an error.CURLE_SSL_ENGINE_NOTFOUND(53) β The specified crypto engine wasn't found.CURLE_SSL_ENGINE_SETFAILED(54) β Failed setting the selected SSL crypto engine as default!CURLE_SEND_ERROR(55) β Failed sending network data.CURLE_RECV_ERROR(56) β Failure with receiving network data.CURLE_SSL_CERTPROBLEM(58) β problem with the local client certificate.CURLE_SSL_CIPHER(59) β Couldn't use specified cipher.CURLE_PEER_FAILED_VERIFICATION(60) β The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK. This error code has been unified withCURLE_SSL_CACERTsince 7.62.0. Its previous value was 51.CURLE_BAD_CONTENT_ENCODING(61) β Unrecognized transfer encoding.CURLE_LDAP_INVALID_URL(62) β Invalid LDAP URL.CURLE_FILESIZE_EXCEEDED(63) β Maximum file size exceeded.CURLE_USE_SSL_FAILED(64) β Requested FTP SSL level failed.CURLE_SEND_FAIL_REWIND(65) β When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed.CURLE_SSL_ENGINE_INITFAILED(66) β Initiating the SSL Engine failed.CURLE_LOGIN_DENIED(67) β The remote server denied curl to login (Added in 7.13.1)CURLE_TFTP_NOTFOUND(68) β File not found on TFTP server.CURLE_TFTP_PERM(69) β Permission problem on TFTP server.CURLE_REMOTE_DISK_FULL(70) β Out of disk space on the server.CURLE_TFTP_ILLEGAL(71) β Illegal TFTP operation.CURLE_TFTP_UNKNOWNID(72) β Unknown TFTP transfer ID.CURLE_REMOTE_FILE_EXISTS(73) β File already exists and will not be overwritten.CURLE_TFTP_NOSUCHUSER(74) β This error should never be returned by a properly functioning TFTP server.CURLE_CONV_FAILED(75) β Character conversion failed.CURLE_CONV_REQD(76) β Caller must register conversion callbacks.CURLE_SSL_CACERT_BADFILE(77) β Problem with reading the SSL CA cert (path? access rights?)CURLE_REMOTE_FILE_NOT_FOUND(78) β The resource referenced in the URL does not exist.CURLE_SSH(79) β An unspecified error occurred during the SSH session.CURLE_SSL_SHUTDOWN_FAILED(80) β Failed to shut down the SSL connection.CURLE_AGAIN(81) β Socket is not ready for send/recv wait till it's ready and try again. This return code is only returned fromcurl_easy_recv(3)andcurl_easy_send(3)(Added in 7.18.2)CURLE_SSL_CRL_BADFILE(82) β Failed to load CRL file (Added in 7.19.0)CURLE_SSL_ISSUER_ERROR(83) β Issuer check failed (Added in 7.19.0)CURLE_FTP_PRET_FAILED(84) β the FTP server either totally does not understand thePRETcommand at all, or it does not support the argument you gave it. Be careful when usingCURLOPT_CUSTOMREQUEST(3): a customLISTcommand will be sent withPRET CMDbeforePASVas well. (Added in7.20.0)CURLE_RTSP_CSEQ_ERROR(85) β mismatch of RTSPCSeqnumbers.CURLE_RTSP_SESSION_ERROR(86) β mismatch of RTSP Session Identifiers.CURLE_FTP_BAD_FILE_LIST(87) β unable to parse the FTP file list (during FTP wildcard downloading).CURLE_CHUNK_FAILED(88) β chunk callback reported an error.CURLE_NO_CONNECTION_AVAILABLE(89) β (for internal use only, will never be returned by libcurl) no connection available, and the session will be queued. (added in7.30.0)CURLE_SSL_PINNEDPUBKEYNOTMATCH(90) β failed to match the pinned key specified withCURLOPT_PINNEDPUBLICKEY(3).CURLE_SSL_INVALIDCERTSTATUS(91) β status returned failure when asked withCURLOPT_SSL_VERIFYSTATUS(3).CURLE_HTTP2_STREAM(92) β stream error in the HTTP/2 framing layer.CURLE_RECURSIVE_API_CALL(93) β an API function was called from inside a callback.CURLE_AUTH_ERROR(94) β an authentication function returned an error.CURLE_HTTP3(95) β a problem was detected in the HTTP/3 layer. This one is somewhat generic and can be one out of several problems, so see the error buffer for details.CURLE_QUIC_CONNECT_ERROR(96) β QUIC connection error. This error may be caused by an SSL library error. QUIC is the protocol used for HTTP/3 transfers.CURLE_OBSOLETE*β these error codes will never be returned. They were used in an old libcurl version and are currently unused.
π CURLMcode π
This is the generic return code used by functions in the libcurl multi interface. Also consider curl_multi_strerror(3).
CURLM_CALL_MULTI_PERFORM(-1) β this is not really an error. It means you should callcurl_multi_perform(3)again without doingselect()or similar in between. Before version7.20.0(released on February 9 2010) this could be returned bycurl_multi_perform(3), but in later versions this return code is never used.CURLM_CALL_MULTI_SOCKET(-1) β an alias forCURLM_CALL_MULTI_PERFORM. Never returned by modern libcurl versions.CURLM_OK(0) β things are fine.CURLM_BAD_HANDLE(1) β the passed-in handle is not a validCURLMhandle.CURLM_BAD_EASY_HANDLE(2) β an easy handle was not good/valid. It could mean that it is not an easy handle at all, or possibly that the handle already is in use by this or another multi handle.CURLM_OUT_OF_MEMORY(3) β you are doomed. πCURLM_INTERNAL_ERROR(4) β this can only be returned if libcurl bugs. Please report it to us!CURLM_BAD_SOCKET(5) β the passed-in socket is not a valid one that libcurl already knows about. (Added in7.15.4)CURLM_UNKNOWN_OPTION(6) βcurl_multi_setopt()with unsupported option (Added in7.15.4)CURLM_ADDED_ALREADY(7) β an easy handle already added to a multi handle was attempted to get added a second time. (Added in7.32.1)CURLM_RECURSIVE_API_CALL(8) β an API function was called from inside a callback.CURLM_WAKEUP_FAILURE(9) β wakeup is unavailable or failed.CURLM_BAD_FUNCTION_ARGUMENT(10) β a function was called with a bad parameter.
π¦ CURLSHcode π¦
The "share" interface will return a CURLSHcode to indicate when an error has occurred. Also consider curl_share_strerror(3).
CURLSHE_OK(0) β all fine. Proceed as usual.CURLSHE_BAD_OPTION(1) β an invalid option was passed to the function.CURLSHE_IN_USE(2) β the share object is currently in use.CURLSHE_INVALID(3) β an invalid share object was passed to the function.CURLSHE_NOMEM(4) β not enough memory was available. (Added in7.12.0)CURLSHE_NOT_BUILT_IN(5) β the requested sharing could not be done because the library you use does not have that particular feature enabled. (Added in7.23.0)
π CURLUcode π
CURLUE_BAD_HANDLE(1) β an argument that should be aCURLUpointer was passed in as aNULL.CURLUE_BAD_PARTPOINTER(2) β aNULLpointer was passed to thepartargument ofcurl_url_get(3).CURLUE_MALFORMED_INPUT(3) β a malformed input was passed to a URL API function.CURLUE_BAD_PORT_NUMBER(4) β the port number was not a decimal number between0and65535.CURLUE_UNSUPPORTED_SCHEME(5) β this libcurl build does not support the given URL scheme.CURLUE_URLDECODE(6) β URL decode error, most likely because of rubbish in the input.CURLUE_OUT_OF_MEMORY(7) β a memory function failed.CURLUE_USER_NOT_ALLOWED(8) β credentials were passed in the URL when prohibited.CURLUE_UNKNOWN_PART(9) β an unknown part ID was passed to a URL API function.CURLUE_NO_SCHEME(10) β there is no scheme part in the URL.CURLUE_NO_USER(11) β there is no user part in the URL.CURLUE_NO_PASSWORD(12) β there is no password part in the URL.CURLUE_NO_OPTIONS(13) β there is no options part in the URL.CURLUE_NO_HOST(14) β there is no host part in the URL.CURLUE_NO_PORT(15) β there is no port part in the URL.CURLUE_NO_QUERY(16) β there is no query part in the URL.CURLUE_NO_FRAGMENT(17) β there is no fragment part in the URL.
π SEE ALSO π
curl_easy_strerror(3)curl_multi_strerror(3)curl_share_strerror(3)CURLOPT_ERRORBUFFER(3)CURLOPT_VERBOSE(3)CURLOPT_DEBUGFUNCTION(3)
and that is the whole page, bestie π«Ά this one comes from version libcurl 7.20.0, dated 1 Jan 2010, and it is the libcurl-errors(3) page π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms