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              Could  not  resolve proxy. The given proxy host could not be re‐
49              solved.
50
51       CURLE_COULDNT_RESOLVE_HOST (6)
52              Could not 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 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       Obsolete error (20)
114              Not used in modern versions.
115
116       CURLE_QUOTE_ERROR (21)
117              When sending custom "QUOTE" commands to the remote  server,  one
118              of  the  commands  returned an error code that was 400 or higher
119              (for FTP) or otherwise indicated unsuccessful completion of  the
120              command.
121
122       CURLE_HTTP_RETURNED_ERROR (22)
123              This  is  returned if CURLOPT_FAILONERROR(3) is set TRUE and the
124              HTTP server returns an error code that is >= 400.
125
126       CURLE_WRITE_ERROR (23)
127              An error occurred when writing received data to a local file, or
128              an error was returned to libcurl from a write callback.
129
130       Obsolete error (24)
131              Not used in modern versions.
132
133       CURLE_UPLOAD_FAILED (25)
134              Failed starting the upload. For FTP, the server typically denied
135              the STOR command. The error buffer usually contains the server's
136              explanation for this.
137
138       CURLE_READ_ERROR (26)
139              There was a problem reading a local file or an error returned by
140              the read callback.
141
142       CURLE_OUT_OF_MEMORY (27)
143              A memory allocation request failed. This is serious badness  and
144              things are severely screwed up if this ever occurs.
145
146       CURLE_OPERATION_TIMEDOUT (28)
147              Operation timeout. The specified time-out period was reached ac‐
148              cording to the conditions.
149
150       Obsolete error (29)
151              Not used in modern versions.
152
153       CURLE_FTP_PORT_FAILED (30)
154              The FTP PORT command returned error. This  mostly  happens  when
155              you have not specified a good enough address for libcurl to use.
156              See CURLOPT_FTPPORT(3).
157
158       CURLE_FTP_COULDNT_USE_REST (31)
159              The FTP REST command returned error. This should never happen if
160              the server is sane.
161
162       Obsolete error (32)
163              Not used in modern versions.
164
165       CURLE_RANGE_ERROR (33)
166              The server does not support or accept range requests.
167
168       CURLE_HTTP_POST_ERROR (34)
169              This  is  an odd error that mainly occurs due to internal confu‐
170              sion.
171
172       CURLE_SSL_CONNECT_ERROR (35)
173              A problem occurred somewhere in the SSL/TLS handshake.  You  re‐
174              ally want the error buffer and read the message there as it pin‐
175              points the problem slightly more. Could  be  certificates  (file
176              formats, paths, permissions), passwords, and others.
177
178       CURLE_BAD_DOWNLOAD_RESUME (36)
179              The  download  could not be resumed because the specified offset
180              was out of the file boundary.
181
182       CURLE_FILE_COULDNT_READ_FILE (37)
183              A file given with FILE:// could not be opened. Most  likely  be‐
184              cause  the file path does not identify an existing file. Did you
185              check file permissions?
186
187       CURLE_LDAP_CANNOT_BIND (38)
188              LDAP cannot bind. LDAP bind operation failed.
189
190       CURLE_LDAP_SEARCH_FAILED (39)
191              LDAP search failed.
192
193       Obsolete error (40)
194              Not used in modern versions.
195
196       CURLE_FUNCTION_NOT_FOUND (41)
197              Function not found. A required zlib function was not found.
198
199       CURLE_ABORTED_BY_CALLBACK (42)
200              Aborted by callback. A callback returned "abort" to libcurl.
201
202       CURLE_BAD_FUNCTION_ARGUMENT (43)
203              A function was called with a bad parameter.
204
205       Obsolete error (44)
206              Not used in modern versions.
207
208       CURLE_INTERFACE_FAILED (45)
209              Interface error. A specified outgoing  interface  could  not  be
210              used.  Set  which  interface  to  use  for outgoing connections'
211              source IP address with CURLOPT_INTERFACE(3).
212
213       Obsolete error (46)
214              Not used in modern versions.
215
216       CURLE_TOO_MANY_REDIRECTS (47)
217              Too many redirects. When following redirects,  libcurl  hit  the
218              maximum amount.  Set your limit with CURLOPT_MAXREDIRS(3).
219
220       CURLE_UNKNOWN_OPTION (48)
221              An  option  passed  to libcurl is not recognized/known. Refer to
222              the appropriate documentation. This is most likely a problem  in
223              the  program  that  uses libcurl. The error buffer might contain
224              more specific information about which exact option it concerns.
225
226       CURLE_SETOPT_OPTION_SYNTAX (49)
227              An option passed in to a setopt was wrongly formatted. See error
228              message for details about what option.
229
230       Obsolete errors (50-51)
231              Not used in modern versions.
232
233       CURLE_GOT_NOTHING (52)
234              Nothing  was  returned  from  the  server, and under the circum‐
235              stances, getting nothing is considered an error.
236
237       CURLE_SSL_ENGINE_NOTFOUND (53)
238              The specified crypto engine was not found.
239
240       CURLE_SSL_ENGINE_SETFAILED (54)
241              Failed setting the selected SSL crypto engine as default.
242
243       CURLE_SEND_ERROR (55)
244              Failed sending network data.
245
246       CURLE_RECV_ERROR (56)
247              Failure with receiving network data.
248
249       Obsolete error (57)
250              Not used in modern versions.
251
252       CURLE_SSL_CERTPROBLEM (58)
253              problem with the local client certificate.
254
255       CURLE_SSL_CIPHER (59)
256              Could not use specified cipher.
257
258       CURLE_PEER_FAILED_VERIFICATION (60)
259              The remote server's  SSL  certificate  or  SSH  fingerprint  was
260              deemed   not   OK.   This  error  code  has  been  unified  with
261              CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.
262
263       CURLE_BAD_CONTENT_ENCODING (61)
264              Unrecognized transfer encoding.
265
266       Obsolete error (62)
267              Not used in modern versions.
268
269       CURLE_FILESIZE_EXCEEDED (63)
270              Maximum file size exceeded.
271
272       CURLE_USE_SSL_FAILED (64)
273              Requested FTP SSL level failed.
274
275       CURLE_SEND_FAIL_REWIND (65)
276              When doing a send operation curl had to rewind the data  to  re‐
277              transmit, but the rewinding operation failed.
278
279       CURLE_SSL_ENGINE_INITFAILED (66)
280              Initiating the SSL Engine failed.
281
282       CURLE_LOGIN_DENIED (67)
283              The remote server denied curl to login (Added in 7.13.1)
284
285       CURLE_TFTP_NOTFOUND (68)
286              File not found on TFTP server.
287
288       CURLE_TFTP_PERM (69)
289              Permission problem on TFTP server.
290
291       CURLE_REMOTE_DISK_FULL (70)
292              Out of disk space on the server.
293
294       CURLE_TFTP_ILLEGAL (71)
295              Illegal TFTP operation.
296
297       CURLE_TFTP_UNKNOWNID (72)
298              Unknown TFTP transfer ID.
299
300       CURLE_REMOTE_FILE_EXISTS (73)
301              File already exists and will not be overwritten.
302
303       CURLE_TFTP_NOSUCHUSER (74)
304              This  error  should  never be returned by a properly functioning
305              TFTP server.
306
307       Obsolete error (75-76)
308              Not used in modern versions.
309
310       CURLE_SSL_CACERT_BADFILE (77)
311              Problem with reading the SSL CA cert (path? access rights?)
312
313       CURLE_REMOTE_FILE_NOT_FOUND (78)
314              The resource referenced in the URL does not exist.
315
316       CURLE_SSH (79)
317              An unspecified error occurred during the SSH session.
318
319       CURLE_SSL_SHUTDOWN_FAILED (80)
320              Failed to shut down the SSL connection.
321
322       CURLE_AGAIN (81)
323              Socket is not ready for send/recv wait till it's ready  and  try
324              again.  This return code is only returned from curl_easy_recv(3)
325              and curl_easy_send(3) (Added in 7.18.2)
326
327       CURLE_SSL_CRL_BADFILE (82)
328              Failed to load CRL file (Added in 7.19.0)
329
330       CURLE_SSL_ISSUER_ERROR (83)
331              Issuer check failed (Added in 7.19.0)
332
333       CURLE_FTP_PRET_FAILED (84)
334              The FTP server does not understand the PRET command  at  all  or
335              does  not support the given argument. Be careful when using CUR‐
336              LOPT_CUSTOMREQUEST(3), a custom LIST command will be  sent  with
337              the PRET command before PASV as well. (Added in 7.20.0)
338
339       CURLE_RTSP_CSEQ_ERROR (85)
340              Mismatch of RTSP CSeq numbers.
341
342       CURLE_RTSP_SESSION_ERROR (86)
343              Mismatch of RTSP Session Identifiers.
344
345       CURLE_FTP_BAD_FILE_LIST (87)
346              Unable to parse FTP file list (during FTP wildcard downloading).
347
348       CURLE_CHUNK_FAILED (88)
349              Chunk callback reported error.
350
351       CURLE_NO_CONNECTION_AVAILABLE (89)
352              (For  internal  use  only, will never be returned by libcurl) No
353              connection available, the session  will  be  queued.  (added  in
354              7.30.0)
355
356       CURLE_SSL_PINNEDPUBKEYNOTMATCH (90)
357              Failed to match the pinned key specified with CURLOPT_PINNEDPUB‐
358              LICKEY(3).
359
360       CURLE_SSL_INVALIDCERTSTATUS (91)
361              Status returned failure when asked  with  CURLOPT_SSL_VERIFYSTA‐
362              TUS(3).
363
364       CURLE_HTTP2_STREAM (92)
365              Stream error in the HTTP/2 framing layer.
366
367       CURLE_RECURSIVE_API_CALL (93)
368              An API function was called from inside a callback.
369
370       CURLE_AUTH_ERROR (94)
371              An authentication function returned an error.
372
373       CURLE_HTTP3 (95)
374              A  problem  was  detected  in the HTTP/3 layer. This is somewhat
375              generic and can be one out of several problems,  see  the  error
376              buffer for details.
377
378       CURLE_QUIC_CONNECT_ERROR (96)
379              QUIC  connection  error.  This error may be caused by an SSL li‐
380              brary error. QUIC is the protocol used for HTTP/3 transfers.
381
382       CURLE_PROXY (97)
383              Proxy handshake error.  CURLINFO_PROXY_ERROR(3)  provides  extra
384              details on the specific problem.
385
386       CURLE_SSL_CLIENTCERT (98)
387              SSL Client Certificate required.
388
389       CURLE_UNRECOVERABLE_POLL (99)
390              An  internal  call  to poll() or select() returned error that is
391              not recoverable.
392
393       CURLE_OBSOLETE*
394              These error codes will never be returned. They were used  in  an
395              old libcurl version and are currently unused.
396

CURLMcode

398       This  is the generic return code used by functions in the libcurl multi
399       interface. Also consider curl_multi_strerror(3).
400
401       CURLM_CALL_MULTI_PERFORM (-1)
402              This  is  not  really  an  error.  It  means  you  should   call
403              curl_multi_perform(3) again without doing select() or similar in
404              between. Before version 7.20.0 (released  on  February  9  2010)
405              this  could  be  returned by curl_multi_perform(3), but in later
406              versions this return code is never used.
407
408       CURLM_CALL_MULTI_SOCKET (-1)
409              An alias for CURLM_CALL_MULTI_PERFORM. Never returned by  modern
410              libcurl versions.
411
412       CURLM_OK (0)
413              Things are fine.
414
415       CURLM_BAD_HANDLE (1)
416              The passed-in handle is not a valid CURLM handle.
417
418       CURLM_BAD_EASY_HANDLE (2)
419              An  easy handle was not good/valid. It could mean that it is not
420              an easy handle at all, or possibly that the handle already is in
421              use by this or another multi handle.
422
423       CURLM_OUT_OF_MEMORY (3)
424              You are doomed.
425
426       CURLM_INTERNAL_ERROR (4)
427              This  can  only be returned if libcurl bugs. Please report it to
428              us!
429
430       CURLM_BAD_SOCKET (5)
431              The passed-in socket is not a valid  one  that  libcurl  already
432              knows about.  (Added in 7.15.4)
433
434       CURLM_UNKNOWN_OPTION (6)
435              curl_multi_setopt() with unsupported option (Added in 7.15.4)
436
437       CURLM_ADDED_ALREADY (7)
438              An  easy handle already added to a multi handle was attempted to
439              get added a second time. (Added in 7.32.1)
440
441       CURLM_RECURSIVE_API_CALL (8)
442              An API function was called from inside a callback.
443
444       CURLM_WAKEUP_FAILURE (9)
445              Wake up is unavailable or failed.
446
447       CURLM_BAD_FUNCTION_ARGUMENT (10)
448              A function was called with a bad parameter.
449
450       CURLM_ABORTED_BY_CALLBACK (11)
451              A multi handle callback returned error.
452
453       CURLM_UNRECOVERABLE_POLL (12)
454              An internal call to poll() or select() returned  error  that  is
455              not recoverable.
456

CURLSHcode

458       The  "share" interface will return a CURLSHcode to indicate when an er‐
459       ror has occurred. Also consider curl_share_strerror(3).
460
461       CURLSHE_OK (0)
462              All fine. Proceed as usual.
463
464       CURLSHE_BAD_OPTION (1)
465              An invalid option was passed to the function.
466
467       CURLSHE_IN_USE (2)
468              The share object is currently in use.
469
470       CURLSHE_INVALID (3)
471              An invalid share object was passed to the function.
472
473       CURLSHE_NOMEM (4)
474              Not enough memory was available.  (Added in 7.12.0)
475
476       CURLSHE_NOT_BUILT_IN (5)
477              The requested sharing could not be done because the library  you
478              use  do  not  have  that  particular  feature enabled. (Added in
479              7.23.0)
480

CURLUcode

482       The URL interface will return a CURLUcode to indicate when an error has
483       occurred. Also consider curl_url_strerror(3).
484
485       CURLUE_BAD_HANDLE (1)
486              An invalid URL handle was passed as argument.
487
488       CURLUE_BAD_PARTPOINTER (2)
489              An invalid 'part' argument was passed as argument.
490
491       CURLUE_MALFORMED_INPUT (3)
492              A malformed input was passed to a URL API function.
493
494       CURLUE_BAD_PORT_NUMBER (4)
495              The port number was not a decimal number between 0 and 65535.
496
497       CURLUE_UNSUPPORTED_SCHEME (5)
498              This libcurl build does not support the given URL scheme.
499
500       CURLUE_URLDECODE (6)
501              URL decode error, most likely because of rubbish in the input.
502
503       CURLUE_OUT_OF_MEMORY (7)
504              A memory function failed.
505
506       CURLUE_USER_NOT_ALLOWED (8)
507              Credentials was passed in the URL when prohibited.
508
509       CURLUE_UNKNOWN_PART (9)
510              An unknown part ID was passed to a URL API function.
511
512       CURLUE_NO_SCHEME (10)
513              There is no scheme part in the URL.
514
515       CURLUE_NO_USER (11)
516              There is no user part in the URL.
517
518       CURLUE_NO_PASSWORD (12)
519              There is no password part in the URL.
520
521       CURLUE_NO_OPTIONS (13)
522              There is no options part in the URL.
523
524       CURLUE_NO_HOST (14)
525              There is no host part in the URL.
526
527       CURLUE_NO_PORT (15)
528              There is no port part in the URL.
529
530       CURLUE_NO_QUERY (16)
531              There is no query part in the URL.
532
533       CURLUE_NO_FRAGMENT (17)
534              There is no fragment part in the URL.
535
536       CURLUE_NO_ZONEID (18)
537              There is no zone id set in the URL.
538
539       CURLUE_BAD_FILE_URL (19)
540              The file:// URL is invalid.
541
542       CURLUE_BAD_FRAGMENT (20)
543              The  fragment  part  of the URL contained bad or invalid charac‐
544              ters.
545
546       CURLUE_BAD_HOSTNAME (21)
547              The hostname contained bad or invalid characters.
548
549       CURLUE_BAD_IPV6 (22)
550              The IPv6 address hostname contained bad or invalid characters.
551
552       CURLUE_BAD_LOGIN (23)
553              The login part of the URL contained bad or invalid characters.
554
555       CURLUE_BAD_PASSWORD (24)
556              The password part of the URL contained bad  or  invalid  charac‐
557              ters.
558
559       CURLUE_BAD_PATH (25)
560              The path part of the URL contained bad or invalid characters.
561
562       CURLUE_BAD_QUERY (26)
563              The query part of the URL contained bad or invalid characters.
564
565       CURLUE_BAD_SCHEME (27)
566              The scheme part of the URL contained bad or invalid characters.
567
568       CURLUE_BAD_SLASHES (28)
569              The URL contained an invalid number of slashes.
570
571       CURLUE_BAD_USER (29)
572              The user part of the URL contained bad or invalid characters.
573

CURLHcode

575       The  header interface returns a CURLHcode to indicate when an error has
576       occurred.
577
578       CURLHE_BADINDEX (1)
579              There is no header with the requested index.
580
581       CURLHE_MISSING (2)
582              No such header exists.
583
584       CURLHE_NOHEADERS (3)
585              No headers at all have been recorded.
586
587       CURLHE_NOREQUEST (4)
588              There was no such request number.
589
590       CURLHE_OUT_OF_MEMORY (5)
591              Out of resources
592
593       CURLHE_BAD_ARGUMENT (6)
594              One or more of the given arguments are bad.
595
596       CURLHE_NOT_BUILT_IN (7)
597              HTTP support or the header API has been disabled in the build.
598

SEE ALSO

600       curl_easy_strerror(3), curl_multi_strerror(3),  curl_share_strerror(3),
601       curl_url_strerror(3),  CURLOPT_ERRORBUFFER(3), CURLOPT_VERBOSE(3), CUR‐
602       LOPT_DEBUGFUNCTION(3)
603
604
605
606libcurl 8.0.1                  February 27, 2023             libcurl-errors(3)
Impressum