<pclass="level0">libcurl-errors - error codes in libcurl <aname="DESCRIPTION"></a><h2class="nroffsh">DESCRIPTION</h2>
<pclass="level0">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. <aname="CURLcode"></a><h2class="nroffsh">CURLcode</h2>
<pclass="level0">Almost all "easy" interface functions return a CURLcode error code. No matter what, using the <aClass="emphasis"href="./curl_easy_setopt.html">curl_easy_setopt</a> option <spanClass="emphasis">CURLOPT_ERRORBUFFER(3)</span> 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. <aClass="emphasis"href="./curl_easy_strerror.html">curl_easy_strerror</a> can be called to get an error string from a given CURLcode number.
<pclass="level1">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.
<pclass="level1">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.
<pclass="level1">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.
<pclass="level1">The server sent data libcurl couldn't parse. This error code is used for more than just FTP and is aliased as <spanClass="emphasis">CURLE_WEIRD_SERVER_REPLY</span> since 7.51.0.
<pclass="level1">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.
<pclass="level1">After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned.
<pclass="level1">During an active FTP session while waiting for the server to connect, the <spanClass="emphasis">CURLOPT_ACCEPTTIMEOUT_MS(3)</span> (or the internal default) timeout expired.
<pclass="level1">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.
<pclass="level1">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.
<pclass="level1">When sending custom "QUOTE" commands 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.
<pclass="level1">This is returned if <spanClass="emphasis">CURLOPT_FAILONERROR(3)</span> is set TRUE and the HTTP server returns an error code that is >= 400.
<pclass="level1">Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server's explanation for this.
<pclass="level1">The FTP PORT command returned error. This mostly happens when you haven't specified a good enough address for libcurl to use. See <spanClass="emphasis">CURLOPT_FTPPORT(3)</span>.
<pclass="level1">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.
<pclass="level1">A file given with FILE:// couldn't be opened. Most likely because the file path doesn't identify an existing file. Did you check file permissions?
<pclass="level1">Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with <spanClass="emphasis">CURLOPT_INTERFACE(3)</span>.
<pclass="level1">Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with <spanClass="emphasis">CURLOPT_MAXREDIRS(3)</span>.
<pclass="level1">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.
<pclass="level1">Socket is not ready for send/recv wait till it's ready and try again. This return code is only returned from <aClass="emphasis"href="./curl_easy_recv.html">curl_easy_recv</a> and <aClass="emphasis"href="./curl_easy_send.html">curl_easy_send</a> (Added in 7.18.2)
<pclass="level1">The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using <spanClass="emphasis">CURLOPT_CUSTOMREQUEST(3)</span>, a custom LIST command will be sent with PRET CMD before PASV as well. (Added in 7.20.0)
<pclass="level1">These error codes will never be returned. They were used in an old libcurl version and are currently unused. <aname="CURLMcode"></a><h2class="nroffsh">CURLMcode</h2>
<pclass="level0">This is the generic return code used by functions in the libcurl multi interface. Also consider <aClass="emphasis"href="./curl_multi_strerror.html">curl_multi_strerror</a>.
<pclass="level1">This is not really an error. It means you should call <aClass="emphasis"href="./curl_multi_perform.html">curl_multi_perform</a> again without doing select() or similar in between. Before version 7.20.0 this could be returned by <aClass="emphasis"href="./curl_multi_perform.html">curl_multi_perform</a>, but in later versions this return code is never used.
<pclass="level1">An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle.
<pclass="level1">An easy handle already added to a multi handle was attempted to get added a second time. (Added in 7.32.1) <aname="CURLSHcode"></a><h2class="nroffsh">CURLSHcode</h2>
<pclass="level0">The "share" interface will return a CURLSHcode to indicate when an error has occurred. Also consider <aClass="emphasis"href="./curl_share_strerror.html">curl_share_strerror</a>.
<pclass="level1">The requested sharing could not be done because the library you use don't have that particular feature enabled. (Added in 7.23.0) <aname="SEE"></a><h2class="nroffsh">SEE ALSO</h2>