1libcurl-errors(3)               libcurl errors               libcurl-errors(3)
2
3
4

NAME

6       libcurl-errors - error codes in libcurl
7

DESCRIPTION

9       This  man  page  includes  most,  if  not all, available error codes in
10       libcurl.  Why they occur and possibly what you can do to fix the  prob‐
11       lem are also included.
12

CURLcode

14       Almost  all "easy" interface functions return a CURLcode error code. No
15       matter  what,  using  the  curl_easy_setopt(3)  option   CURLOPT_ERROR‐
16       BUFFER(3)  is  a  good  idea as it will give you a human readable error
17       string that may offer more details about the cause of  the  error  than
18       just the error code.  curl_easy_strerror(3) can be called to get an er‐
19       ror string from a given CURLcode number.
20
21       CURLcode is one of the following:
22
23       CURLE_OK (0)
24              All fine. Proceed as usual.
25
26       CURLE_UNSUPPORTED_PROTOCOL (1)
27              The URL you passed to libcurl used a protocol that this  libcurl
28              does  not  support.  The  support might be a compile-time option
29              that you did not use, it can be a misspelled protocol string  or
30              just a protocol libcurl has no code for.
31
32       CURLE_FAILED_INIT (2)
33              Early initialization code failed. This is likely to be an inter‐
34              nal error or problem, or a resource problem where something fun‐
35              damental could not get done at init time.
36
37       CURLE_URL_MALFORMAT (3)
38              The URL was not properly formatted.
39
40       CURLE_NOT_BUILT_IN (4)
41              A  requested  feature, protocol or option was not found built-in
42              in this libcurl due to a build-time decision. This means that  a
43              feature  or  option  was not enabled or explicitly disabled when
44              libcurl was built and in order to get it to function you have to
45              get a rebuilt libcurl.
46
47       CURLE_COULDNT_RESOLVE_PROXY (5)
48              Couldn't  resolve  proxy.  The given proxy host could not be re‐
49              solved.
50
51       CURLE_COULDNT_RESOLVE_HOST (6)
52              Couldn't resolve host. The given remote host was not resolved.
53
54       CURLE_COULDNT_CONNECT (7)
55              Failed to connect() to host or proxy.
56
57       CURLE_WEIRD_SERVER_REPLY (8)
58              The server sent data libcurl could not parse.  This  error  code
59              was known as as CURLE_FTP_WEIRD_SERVER_REPLY before 7.51.0.
60
61       CURLE_REMOTE_ACCESS_DENIED (9)
62              We were denied access to the resource given in the URL. For FTP,
63              this occurs while trying to change to the remote directory.
64
65       CURLE_FTP_ACCEPT_FAILED (10)
66              While waiting for the server to connect back when an active  FTP
67              session is used, an error code was sent over the control connec‐
68              tion or similar.
69
70       CURLE_FTP_WEIRD_PASS_REPLY (11)
71              After having sent the FTP password to the  server,  libcurl  ex‐
72              pects  a  proper  reply. This error code indicates that an unex‐
73              pected code was returned.
74
75       CURLE_FTP_ACCEPT_TIMEOUT (12)
76              During an active FTP session while waiting  for  the  server  to
77              connect,  the  CURLOPT_ACCEPTTIMEOUT_MS(3)  (or the internal de‐
78              fault) timeout expired.
79
80       CURLE_FTP_WEIRD_PASV_REPLY (13)
81              libcurl failed to get a sensible result back from the server  as
82              a  response  to  either  a PASV or a EPSV command. The server is
83              flawed.
84
85       CURLE_FTP_WEIRD_227_FORMAT (14)
86              FTP servers return a 227-line as a response to a  PASV  command.
87              If  libcurl fails to parse that line, this return code is passed
88              back.
89
90       CURLE_FTP_CANT_GET_HOST (15)
91              An internal failure to lookup the host used for the new  connec‐
92              tion.
93
94       CURLE_HTTP2 (16)
95              A problem was detected in the HTTP2 framing layer. This is some‐
96              what generic and can be one out of several problems, see the er‐
97              ror buffer for details.
98
99       CURLE_FTP_COULDNT_SET_TYPE (17)
100              Received an error when trying to set the transfer mode to binary
101              or ASCII.
102
103       CURLE_PARTIAL_FILE (18)
104              A file transfer was shorter or larger than expected.  This  hap‐
105              pens  when  the  server first reports an expected transfer size,
106              and then delivers data that does not match the previously  given
107              size.
108
109       CURLE_FTP_COULDNT_RETR_FILE (19)
110              This was either a weird reply to a 'RETR' command or a zero byte
111              transfer complete.
112
113       CURLE_QUOTE_ERROR (21)
114              When sending custom "QUOTE" commands to the remote  server,  one
115              of  the  commands  returned an error code that was 400 or higher
116              (for FTP) or otherwise indicated unsuccessful completion of  the
117              command.
118
119       CURLE_HTTP_RETURNED_ERROR (22)
120              This  is  returned if CURLOPT_FAILONERROR(3) is set TRUE and the
121              HTTP server returns an error code that is >= 400.
122
123       CURLE_WRITE_ERROR (23)
124              An error occurred when writing received data to a local file, or
125              an error was returned to libcurl from a write callback.
126
127       CURLE_UPLOAD_FAILED (25)
128              Failed starting the upload. For FTP, the server typically denied
129              the STOR command. The error buffer usually contains the server's
130              explanation for this.
131
132       CURLE_READ_ERROR (26)
133              There was a problem reading a local file or an error returned by
134              the read callback.
135
136       CURLE_OUT_OF_MEMORY (27)
137              A memory allocation request failed. This is serious badness  and
138              things are severely screwed up if this ever occurs.
139
140       CURLE_OPERATION_TIMEDOUT (28)
141              Operation timeout. The specified time-out period was reached ac‐
142              cording to the conditions.
143
144       CURLE_FTP_PORT_FAILED (30)
145              The FTP PORT command returned error. This  mostly  happens  when
146              you have not specified a good enough address for libcurl to use.
147              See CURLOPT_FTPPORT(3).
148
149       CURLE_FTP_COULDNT_USE_REST (31)
150              The FTP REST command returned error. This should never happen if
151              the server is sane.
152
153       CURLE_RANGE_ERROR (33)
154              The server does not support or accept range requests.
155
156       CURLE_HTTP_POST_ERROR (34)
157              This  is  an odd error that mainly occurs due to internal confu‐
158              sion.
159
160       CURLE_SSL_CONNECT_ERROR (35)
161              A problem occurred somewhere in the SSL/TLS handshake.  You  re‐
162              ally want the error buffer and read the message there as it pin‐
163              points the problem slightly more. Could  be  certificates  (file
164              formats, paths, permissions), passwords, and others.
165
166       CURLE_BAD_DOWNLOAD_RESUME (36)
167              The  download  could not be resumed because the specified offset
168              was out of the file boundary.
169
170       CURLE_FILE_COULDNT_READ_FILE (37)
171              A file given with FILE:// could not be opened. Most  likely  be‐
172              cause  the file path does not identify an existing file. Did you
173              check file permissions?
174
175       CURLE_LDAP_CANNOT_BIND (38)
176              LDAP cannot bind. LDAP bind operation failed.
177
178       CURLE_LDAP_SEARCH_FAILED (39)
179              LDAP search failed.
180
181       CURLE_FUNCTION_NOT_FOUND (41)
182              Function not found. A required zlib function was not found.
183
184       CURLE_ABORTED_BY_CALLBACK (42)
185              Aborted by callback. A callback returned "abort" to libcurl.
186
187       CURLE_BAD_FUNCTION_ARGUMENT (43)
188              A function was called with a bad parameter.
189
190       CURLE_INTERFACE_FAILED (45)
191              Interface error. A specified outgoing  interface  could  not  be
192              used.  Set  which  interface  to  use  for outgoing connections'
193              source IP address with CURLOPT_INTERFACE(3).
194
195       CURLE_TOO_MANY_REDIRECTS (47)
196              Too many redirects. When following redirects,  libcurl  hit  the
197              maximum amount.  Set your limit with CURLOPT_MAXREDIRS(3).
198
199       CURLE_UNKNOWN_OPTION (48)
200              An  option  passed  to libcurl is not recognized/known. Refer to
201              the appropriate documentation. This is most likely a problem  in
202              the  program  that  uses libcurl. The error buffer might contain
203              more specific information about which exact option it concerns.
204
205       CURLE_SETOPT_OPTION_SYNTAX (49)
206              An option passed in to a setopt was wrongly formatted. See error
207              message for details about what option.
208
209       CURLE_GOT_NOTHING (52)
210              Nothing  was  returned  from  the  server, and under the circum‐
211              stances, getting nothing is considered an error.
212
213       CURLE_SSL_ENGINE_NOTFOUND (53)
214              The specified crypto engine was not found.
215
216       CURLE_SSL_ENGINE_SETFAILED (54)
217              Failed setting the selected SSL crypto engine as default.
218
219       CURLE_SEND_ERROR (55)
220              Failed sending network data.
221
222       CURLE_RECV_ERROR (56)
223              Failure with receiving network data.
224
225       CURLE_SSL_CERTPROBLEM (58)
226              problem with the local client certificate.
227
228       CURLE_SSL_CIPHER (59)
229              Couldn't use specified cipher.
230
231       CURLE_PEER_FAILED_VERIFICATION (60)
232              The remote server's SSL certificate or SSH md5  fingerprint  was
233              deemed   not   OK.   This  error  code  has  been  unified  with
234              CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.
235
236       CURLE_BAD_CONTENT_ENCODING (61)
237              Unrecognized transfer encoding.
238
239       CURLE_LDAP_INVALID_URL (62)
240              This error code is deprecated since 7.82.0  and  cannot  be  re‐
241              turned anymore.
242
243       CURLE_FILESIZE_EXCEEDED (63)
244              Maximum file size exceeded.
245
246       CURLE_USE_SSL_FAILED (64)
247              Requested FTP SSL level failed.
248
249       CURLE_SEND_FAIL_REWIND (65)
250              When  doing  a send operation curl had to rewind the data to re‐
251              transmit, but the rewinding operation failed.
252
253       CURLE_SSL_ENGINE_INITFAILED (66)
254              Initiating the SSL Engine failed.
255
256       CURLE_LOGIN_DENIED (67)
257              The remote server denied curl to login (Added in 7.13.1)
258
259       CURLE_TFTP_NOTFOUND (68)
260              File not found on TFTP server.
261
262       CURLE_TFTP_PERM (69)
263              Permission problem on TFTP server.
264
265       CURLE_REMOTE_DISK_FULL (70)
266              Out of disk space on the server.
267
268       CURLE_TFTP_ILLEGAL (71)
269              Illegal TFTP operation.
270
271       CURLE_TFTP_UNKNOWNID (72)
272              Unknown TFTP transfer ID.
273
274       CURLE_REMOTE_FILE_EXISTS (73)
275              File already exists and will not be overwritten.
276
277       CURLE_TFTP_NOSUCHUSER (74)
278              This error should never be returned by  a  properly  functioning
279              TFTP server.
280
281       CURLE_CONV_FAILED (75)
282              Character conversion failed.
283
284       CURLE_CONV_REQD (76)
285              Caller must register conversion callbacks.
286
287       CURLE_SSL_CACERT_BADFILE (77)
288              Problem with reading the SSL CA cert (path? access rights?)
289
290       CURLE_REMOTE_FILE_NOT_FOUND (78)
291              The resource referenced in the URL does not exist.
292
293       CURLE_SSH (79)
294              An unspecified error occurred during the SSH session.
295
296       CURLE_SSL_SHUTDOWN_FAILED (80)
297              Failed to shut down the SSL connection.
298
299       CURLE_AGAIN (81)
300              Socket  is  not ready for send/recv wait till it's ready and try
301              again. This return code is only returned from  curl_easy_recv(3)
302              and curl_easy_send(3) (Added in 7.18.2)
303
304       CURLE_SSL_CRL_BADFILE (82)
305              Failed to load CRL file (Added in 7.19.0)
306
307       CURLE_SSL_ISSUER_ERROR (83)
308              Issuer check failed (Added in 7.19.0)
309
310       CURLE_FTP_PRET_FAILED (84)
311              The  FTP  server  does not understand the PRET command at all or
312              does not support the given argument. Be careful when using  CUR‐
313              LOPT_CUSTOMREQUEST(3),  a  custom LIST command will be sent with
314              PRET CMD before PASV as well. (Added in 7.20.0)
315
316       CURLE_RTSP_CSEQ_ERROR (85)
317              Mismatch of RTSP CSeq numbers.
318
319       CURLE_RTSP_SESSION_ERROR (86)
320              Mismatch of RTSP Session Identifiers.
321
322       CURLE_FTP_BAD_FILE_LIST (87)
323              Unable to parse FTP file list (during FTP wildcard downloading).
324
325       CURLE_CHUNK_FAILED (88)
326              Chunk callback reported error.
327
328       CURLE_NO_CONNECTION_AVAILABLE (89)
329              (For internal use only, will never be returned  by  libcurl)  No
330              connection  available,  the  session  will  be queued. (added in
331              7.30.0)
332
333       CURLE_SSL_PINNEDPUBKEYNOTMATCH (90)
334              Failed to match the pinned key specified with CURLOPT_PINNEDPUB‐
335              LICKEY(3).
336
337       CURLE_SSL_INVALIDCERTSTATUS (91)
338              Status  returned  failure when asked with CURLOPT_SSL_VERIFYSTA‐
339              TUS(3).
340
341       CURLE_HTTP2_STREAM (92)
342              Stream error in the HTTP/2 framing layer.
343
344       CURLE_RECURSIVE_API_CALL (93)
345              An API function was called from inside a callback.
346
347       CURLE_AUTH_ERROR (94)
348              An authentication function returned an error.
349
350       CURLE_HTTP3 (95)
351              A problem was detected in the HTTP/3  layer.  This  is  somewhat
352              generic  and  can  be one out of several problems, see the error
353              buffer for details.
354
355       CURLE_QUIC_CONNECT_ERROR (96)
356              QUIC connection error. This error may be caused by  an  SSL  li‐
357              brary error. QUIC is the protocol used for HTTP/3 transfers.
358
359       CURLE_SSL_CLIENTCERT (98)
360              SSL Client Certificate required.
361
362       CURLE_OBSOLETE*
363              These  error  codes will never be returned. They were used in an
364              old libcurl version and are currently unused.
365

CURLMcode

367       This is the generic return code used by functions in the libcurl  multi
368       interface. Also consider curl_multi_strerror(3).
369
370       CURLM_CALL_MULTI_PERFORM (-1)
371              This   is  not  really  an  error.  It  means  you  should  call
372              curl_multi_perform(3) again without doing select() or similar in
373              between.  Before  version  7.20.0  (released on February 9 2010)
374              this could be returned by curl_multi_perform(3),  but  in  later
375              versions this return code is never used.
376
377       CURLM_CALL_MULTI_SOCKET (-1)
378              An  alias for CURLM_CALL_MULTI_PERFORM. Never returned by modern
379              libcurl versions.
380
381       CURLM_OK (0)
382              Things are fine.
383
384       CURLM_BAD_HANDLE (1)
385              The passed-in handle is not a valid CURLM handle.
386
387       CURLM_BAD_EASY_HANDLE (2)
388              An easy handle was not good/valid. It could mean that it is  not
389              an easy handle at all, or possibly that the handle already is in
390              use by this or another multi handle.
391
392       CURLM_OUT_OF_MEMORY (3)
393              You are doomed.
394
395       CURLM_INTERNAL_ERROR (4)
396              This can only be returned if libcurl bugs. Please report  it  to
397              us!
398
399       CURLM_BAD_SOCKET (5)
400              The  passed-in  socket  is  not a valid one that libcurl already
401              knows about.  (Added in 7.15.4)
402
403       CURLM_UNKNOWN_OPTION (6)
404              curl_multi_setopt() with unsupported option (Added in 7.15.4)
405
406       CURLM_ADDED_ALREADY (7)
407              An easy handle already added to a multi handle was attempted  to
408              get added a second time. (Added in 7.32.1)
409
410       CURLM_RECURSIVE_API_CALL (8)
411              An API function was called from inside a callback.
412
413       CURLM_WAKEUP_FAILURE (9)
414              Wakeup is unavailable or failed.
415
416       CURLM_BAD_FUNCTION_ARGUMENT (10)
417              A function was called with a bad parameter.
418
419       CURLM_ABORTED_BY_CALLBACK (11)
420              A multi handle callback returned error.
421

CURLSHcode

423       The  "share" interface will return a CURLSHcode to indicate when an er‐
424       ror has occurred. Also consider curl_share_strerror(3).
425
426       CURLSHE_OK (0)
427              All fine. Proceed as usual.
428
429       CURLSHE_BAD_OPTION (1)
430              An invalid option was passed to the function.
431
432       CURLSHE_IN_USE (2)
433              The share object is currently in use.
434
435       CURLSHE_INVALID (3)
436              An invalid share object was passed to the function.
437
438       CURLSHE_NOMEM (4)
439              Not enough memory was available.  (Added in 7.12.0)
440
441       CURLSHE_NOT_BUILT_IN (5)
442              The requested sharing could not be done because the library  you
443              use  do  not  have  that  particular  feature enabled. (Added in
444              7.23.0)
445

CURLUcode

447       The URL interface will return a CURLUcode to indicate when an error has
448       occurred. Also consider curl_url_strerror(3).
449
450       CURLUE_BAD_HANDLE (1)
451              An invalid CURLU pointer was passed as argument.
452
453       CURLUE_BAD_PARTPOINTER (2)
454              An invalid 'part' argument was passed as argument.
455
456       CURLUE_MALFORMED_INPUT (3)
457              A malformed input was passed to a URL API function.
458
459       CURLUE_BAD_PORT_NUMBER (4)
460              The port number was not a decimal number between 0 and 65535.
461
462       CURLUE_UNSUPPORTED_SCHEME (5)
463              This libcurl build does not support the given URL scheme.
464
465       CURLUE_URLDECODE (6)
466              URL decode error, most likely because of rubbish in the input.
467
468       CURLUE_OUT_OF_MEMORY (7)
469              A memory function failed.
470
471       CURLUE_USER_NOT_ALLOWED (8)
472              Credentials was passed in the URL when prohibited.
473
474       CURLUE_UNKNOWN_PART (9)
475              An unknown part ID was passed to a URL API function.
476
477       CURLUE_NO_SCHEME (10)
478              There is no scheme part in the URL.
479
480       CURLUE_NO_USER (11)
481              There is no user part in the URL.
482
483       CURLUE_NO_PASSWORD (12)
484              There is no password part in the URL.
485
486       CURLUE_NO_OPTIONS (13)
487              There is no options part in the URL.
488
489       CURLUE_NO_HOST (14)
490              There is no host part in the URL.
491
492       CURLUE_NO_PORT (15)
493              There is no port part in the URL.
494
495       CURLUE_NO_QUERY (16)
496              There is no query part in the URL.
497
498       CURLUE_NO_FRAGMENT (17)
499              There is no fragment part in the URL.
500
501       CURLUE_NO_ZONEID (18)
502              There is no zoneid set in the URL.
503
504       CURLUE_BAD_FILE_URL (19)
505              The file:// URL is invalid.
506
507       CURLUE_BAD_FRAGMENT (20)
508              The  fragment  part  of the URL contained bad or invalid charac‐
509              ters.
510
511       CURLUE_BAD_HOSTNAME (21)
512              The hostname contained bad or invalid characters.
513
514       CURLUE_BAD_IPV6 (22)
515              The IPv6 address hostname contained bad or invalid characters.
516
517       CURLUE_BAD_LOGIN (23)
518              The login part of the URL contained bad or invalid characters.
519
520       CURLUE_BAD_PASSWORD (24)
521              The password part of the URL contained bad  or  invalid  charac‐
522              ters.
523
524       CURLUE_BAD_PATH (25)
525              The path part of the URL contained bad or invalid characters.
526
527       CURLUE_BAD_QUERY (26)
528              The query part of the URL contained bad or invalid characters.
529
530       CURLUE_BAD_SCHEME (27)
531              The scheme part of the URL contained bad or invalid characters.
532
533       CURLUE_BAD_SLASHES (28)
534              The URL contained an invalid number of slashes.
535
536       CURLUE_BAD_USER (29)
537              The user part of the URL contained bad or invalid characters.
538

SEE ALSO

540       curl_easy_strerror(3),  curl_multi_strerror(3), curl_share_strerror(3),
541       curl_url_strerror(3), CURLOPT_ERRORBUFFER(3), CURLOPT_VERBOSE(3),  CUR‐
542       LOPT_DEBUGFUNCTION(3)
543
544
545
546libcurl 7.82.0                 January 09, 2022              libcurl-errors(3)
Impressum