libcurl-errors(3)
π libcurl-errors(3) π
from the Library Functions Manual β part 1 of 2, bestie π«Ά
π NAME π
libcurl-errors β error codes in libcurl. Main character energy for your error handling. π
πΈ DESCRIPTION πΈ
Okay so this page has most, if not all, of the available error codes in libcurl. It also spills the tea on why they occur and possibly what you can do to fix the problem. No cap. β¨
π 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 β it gives you a human readable error string that may offer more details about the cause of the error than just the error code. You can also call curl_easy_strerror(3) to get an error string from a given CURLcode number. Iconic. Periodt.
CURLcode is one of the following:
CURLE_OK(0) β All fine. Proceed as usual. β¨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 did not use, it can be a misspelled protocol string or just a protocol libcurl has no code for. πCURLE_FAILED_INIT(2) β Early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental could not 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 into 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) β Could not resolve proxy. The given proxy host could not be resolved. πΈCURLE_COULDNT_RESOLVE_HOST(6) β Could not 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 could not parse. This error code was known asCURLE_FTP_WEIRD_SERVER_REPLYbefore7.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 a PASV or an EPSV command. The server is flawed. πCURLE_FTP_WEIRD_227_FORMAT(14) β FTP servers return a227-lineas a response to a PASV command. 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 does not match the previously given size. πCURLE_FTP_COULDNT_RETR_FILE(19) β This was either a weird reply to a'RETR'command or a zero byte transfer complete. π- Obsolete error (20) β Not used in modern versions.
CURLE_QUOTE_ERROR(21) β When sending custom"QUOTE"commands to the remote server, one of the commands returned an error code that was400or 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. βοΈ- Obsolete error (24) β Not used in modern versions.
CURLE_UPLOAD_FAILED(25) β Failed starting the upload. For FTP, the server typically denied the STOR command. 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. β- Obsolete error (29) β Not used in modern versions.
CURLE_FTP_PORT_FAILED(30) β The FTP PORT command returned error. This mostly happens when you have not specified a good enough address for libcurl to use. SeeCURLOPT_FTPPORT(3). πCURLE_FTP_COULDNT_USE_REST(31) β The FTP REST command returned error. This should never happen if the server is sane. π§- Obsolete error (32) β Not used in modern versions.
CURLE_RANGE_ERROR(33) β The server does not support or accept range requests. π- Obsolete error (34) β Not used since
7.56.0. 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://could not be opened. Most likely because the file path does not 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. π- Obsolete error (40) β Not used in modern versions.
- Obsolete error (41) β Not used since
7.53.0. 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. π- Obsolete error (44) β Not used in modern versions.
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). π- Obsolete error (46) β Not used in modern versions.
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_SETOPT_OPTION_SYNTAX(49) β An option passed in to a setopt was wrongly formatted. See error message for details about what option. π- Obsolete errors (50-51) β Not used in modern versions.
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 was not 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. π₯- Obsolete error (57) β Not used in modern versions.
CURLE_SSL_CERTPROBLEM(58) β problem with the local client certificate. πCURLE_SSL_CIPHER(59) β Could not use specified cipher. πCURLE_PEER_FAILED_VERIFICATION(60) β The remote server's SSL certificate or SSH fingerprint was deemed not OK. This error code has been unified withCURLE_SSL_CACERTsince7.62.0. Its previous value was51. π΅οΈCURLE_BAD_CONTENT_ENCODING(61) β Unrecognized transfer encoding. π€·- Obsolete error (62) β Not used in modern versions.
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. πͺ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 is not overwritten. πCURLE_TFTP_NOSUCHUSER(74) β This error should never be returned by a properly functioning TFTP server. π§- Obsolete error (75-76) β Not used in modern versions.
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 until it is ready and try again. This return code is only returned fromcurl_easy_recv(3)andcurl_easy_send(3).CURLE_SSL_CRL_BADFILE(82) β Failed to load CRL file.CURLE_SSL_ISSUER_ERROR(83) β Issuer check failed.CURLE_FTP_PRET_FAILED(84) β The FTP server does not understand thePRETcommand at all or does not support the given argument. Be careful when usingCURLOPT_CUSTOMREQUEST(3), a customLISTcommand is sent with thePRETcommand beforePASVas well.CURLE_RTSP_CSEQ_ERROR(85) β Mismatch of RTSP CSeq numbers.CURLE_RTSP_SESSION_ERROR(86) β Mismatch of RTSP Session Identifiers.CURLE_FTP_BAD_FILE_LIST(87) β Unable to parse FTP file list (during FTP wildcard downloading).CURLE_CHUNK_FAILED(88) β Chunk callback reported error.CURLE_NO_CONNECTION_AVAILABLE(89) β (For internal use only, is never returned by libcurl) No connection available, the session is queued.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 is somewhat generic and can be one out of several problems, 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_PROXY(97) β Proxy handshake error.CURLINFO_PROXY_ERROR(3)provides extra details on the specific problem.CURLE_SSL_CLIENTCERT(98) β SSL Client Certificate required.CURLE_UNRECOVERABLE_POLL(99) β An internal call topoll()orselect()returned error that is not recoverable.CURLE_TOO_LARGE(100) β A value or data field grew larger than allowed.CURLE_ECH_REQUIRED(101) β ECH was attempted but failed.
π₯ 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.CURLM_UNKNOWN_OPTION(6) βcurl_multi_setopt()was given an unsupported option.CURLM_ADDED_ALREADY(7) β An easy handle already added to a multi handle was attempted to get added a second time.CURLM_RECURSIVE_API_CALL(8) β An API function was called from inside a callback.CURLM_WAKEUP_FAILURE(9) β Wake up is unavailable or failed.CURLM_BAD_FUNCTION_ARGUMENT(10) β A function was called with a bad parameter.CURLM_ABORTED_BY_CALLBACK(11) β A multi handle callback returned error.CURLM_UNRECOVERABLE_POLL(12) β An internal call topoll()orselect()returned error that is not recoverable.
π«Ά CURLSHcode π«Ά
The "share" interface returns 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.CURLSHE_NOT_BUILT_IN(5) β The requested sharing could not be done because the library you use do not have that particular feature enabled.
π CURLUcode π
The URL interface returns a CURLUcode to indicate when an error has occurred. Also consider curl_url_strerror(3).
CURLUE_OK(0) β All fine. Proceed as usual.CURLUE_BAD_HANDLE(1) β An invalid URL handle was passed as argument.CURLUE_BAD_PARTPOINTER(2) β An invalid'part'argument was passed as argument.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 was 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.CURLUE_NO_ZONEID(18) β There is no zone id set in the URL.CURLUE_BAD_FILE_URL(19) β Thefile://URL is invalid.CURLUE_BAD_FRAGMENT(20) β The fragment part of the URL contained bad or invalid characters.CURLUE_BAD_HOSTNAME(21) β The hostname contained bad or invalid characters.CURLUE_BAD_IPV6(22) β The IPv6 address hostname contained bad or invalid characters.CURLUE_BAD_LOGIN(23) β The login part of the URL contained bad or invalid characters.CURLUE_BAD_PASSWORD(24) β The password part of the URL contained bad or invalid characters.CURLUE_BAD_PATH(25) β The path part of the URL contained bad or invalid characters.CURLUE_BAD_QUERY(26) β The query part of the URL contained bad or invalid characters.CURLUE_BAD_SCHEME(27) β The scheme part of the URL contained bad or invalid characters.CURLUE_BAD_SLASHES(28) β The URL contained an invalid number of slashes.CURLUE_BAD_USER(29) β The user part of the URL contained bad or invalid characters.CURLUE_LACKS_IDN(30) β libcurl lacks IDN support.CURLUE_TOO_LARGE(31) β A value or data field is larger than allowed.
π CURLHcode π
The header interface returns a CURLHcode to indicate when an error has occurred.
CURLHE_OK(0) β All fine. Proceed as usual.CURLHE_BADINDEX(1) β There is no header with the requested index.CURLHE_MISSING(2) β No such header exists.CURLHE_NOHEADERS(3) β No headers at all have been recorded.CURLHE_NOREQUEST(4) β There was no such request number.CURLHE_OUT_OF_MEMORY(5) β Out of resources.CURLHE_BAD_ARGUMENT(6) β One or more of the given arguments are bad.CURLHE_NOT_BUILT_IN(7) β HTTP support or the header API has been disabled in the build.
π SEE ALSO π
CURLOPT_DEBUGFUNCTION(3), CURLOPT_ERRORBUFFER(3), CURLOPT_VERBOSE(3), curl_easy_strerror(3), curl_multi_strerror(3), curl_share_strerror(3), curl_url_strerror(3)
π That's the whole tea, bestie β source/version libcurl, date 2026-10-12, page libcurl-errors(3). Go forth and decode those return codes like the main character you are. πβ¨
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms