Skip to content

Instantly share code, notes, and snippets.

@glombard
Created January 13, 2016 02:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glombard/50aacc001b8a9cdfd53a to your computer and use it in GitHub Desktop.
Save glombard/50aacc001b8a9cdfd53a to your computer and use it in GitHub Desktop.
Python script to generate json file and shell script with curl exit codes
[
{
"description": "All fine",
"code": 0,
"name": "CURLE_OK",
"long_description": "All fine. Proceed as usual.\n"
},
{
"description": "The URL you passed to libcurl used a protocol that this libcurl does not support",
"code": 1,
"name": "CURLE_UNSUPPORTED_PROTOCOL",
"long_description": "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.\n"
},
{
"description": "Very early initialization code failed",
"code": 2,
"name": "CURLE_FAILED_INIT",
"long_description": "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.\n"
},
{
"description": "The URL was not properly formatted",
"code": 3,
"name": "CURLE_URL_MALFORMAT",
"long_description": "The URL was not properly formatted.\n"
},
{
"description": "A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision",
"code": 4,
"name": "CURLE_NOT_BUILT_IN",
"long_description": "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.\n"
},
{
"description": "Couldn't resolve proxy",
"code": 5,
"name": "CURLE_COULDNT_RESOLVE_PROXY",
"long_description": "Couldn't resolve proxy. The given proxy host could not be resolved.\n"
},
{
"description": "Couldn't resolve host",
"code": 6,
"name": "CURLE_COULDNT_RESOLVE_HOST",
"long_description": "Couldn't resolve host. The given remote host was not resolved.\n"
},
{
"description": "Failed to connect() to host or proxy",
"code": 7,
"name": "CURLE_COULDNT_CONNECT",
"long_description": "Failed to connect() to host or proxy.\n"
},
{
"description": "After connecting to a FTP server, libcurl expects to get a certain reply back",
"code": 8,
"name": "CURLE_FTP_WEIRD_SERVER_REPLY",
"long_description": "After connecting to a FTP server, libcurl expects to get a certain reply back. This error code implies that it got a strange or bad reply. The given remote server is probably not an OK FTP server.\n"
},
{
"description": "We were denied access to the resource given in the URL",
"code": 9,
"name": "CURLE_REMOTE_ACCESS_DENIED",
"long_description": "We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory.\n"
},
{
"description": "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",
"code": 10,
"name": "CURLE_FTP_ACCEPT_FAILED",
"long_description": "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.\n"
},
{
"description": "After having sent the FTP password to the server, libcurl expects a proper reply",
"code": 11,
"name": "CURLE_FTP_WEIRD_PASS_REPLY",
"long_description": "After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned.\n"
},
{
"description": "During an active FTP session while waiting for the server to connect, the CURLOPT_ACCEPTTIMEOUT_MS (or the internal default) timeout expired",
"code": 12,
"name": "CURLE_FTP_ACCEPT_TIMEOUT",
"long_description": "During an active FTP session while waiting for the server to connect, the <a Class=\"emphasis\" href=\"./CURLOPT_ACCEPTTIMEOUT_MS.html\">CURLOPT_ACCEPTTIMEOUT_MS</a> (or the internal default) timeout expired.\n"
},
{
"description": "libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command",
"code": 13,
"name": "CURLE_FTP_WEIRD_PASV_REPLY",
"long_description": "libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed.\n"
},
{
"description": "FTP servers return a 227-line as a response to a PASV command",
"code": 14,
"name": "CURLE_FTP_WEIRD_227_FORMAT",
"long_description": "FTP servers return a 227-line as a response to a PASV command. If libcurl fails to parse that line, this return code is passed back.\n"
},
{
"description": "An internal failure to lookup the host used for the new connection",
"code": 15,
"name": "CURLE_FTP_CANT_GET_HOST",
"long_description": "An internal failure to lookup the host used for the new connection.\n"
},
{
"description": "A problem was detected in the HTTP2 framing layer",
"code": 16,
"name": "CURLE_HTTP2",
"long_description": "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.\n"
},
{
"description": "Received an error when trying to set the transfer mode to binary or ASCII",
"code": 17,
"name": "CURLE_FTP_COULDNT_SET_TYPE",
"long_description": "Received an error when trying to set the transfer mode to binary or ASCII.\n"
},
{
"description": "A file transfer was shorter or larger than expected",
"code": 18,
"name": "CURLE_PARTIAL_FILE",
"long_description": "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.\n"
},
{
"description": "This was either a weird reply to a 'RETR' command or a zero byte transfer complete",
"code": 19,
"name": "CURLE_FTP_COULDNT_RETR_FILE",
"long_description": "This was either a weird reply to a 'RETR' command or a zero byte transfer complete.\n"
},
{
"description": "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",
"code": 21,
"name": "CURLE_QUOTE_ERROR",
"long_description": "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.\n"
},
{
"description": "This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is &gt;= 400",
"code": 22,
"name": "CURLE_HTTP_RETURNED_ERROR",
"long_description": "This is returned if <a Class=\"emphasis\" href=\"./CURLOPT_FAILONERROR.html\">CURLOPT_FAILONERROR</a> is set TRUE and the HTTP server returns an error code that is &gt;= 400.\n"
},
{
"description": "An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback",
"code": 23,
"name": "CURLE_WRITE_ERROR",
"long_description": "An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.\n"
},
{
"description": "Failed starting the upload",
"code": 25,
"name": "CURLE_UPLOAD_FAILED",
"long_description": "Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server's explanation for this.\n"
},
{
"description": "There was a problem reading a local file or an error returned by the read callback",
"code": 26,
"name": "CURLE_READ_ERROR",
"long_description": "There was a problem reading a local file or an error returned by the read callback.\n"
},
{
"description": "A memory allocation request failed",
"code": 27,
"name": "CURLE_OUT_OF_MEMORY",
"long_description": "A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs.\n"
},
{
"description": "Operation timeout",
"code": 28,
"name": "CURLE_OPERATION_TIMEDOUT",
"long_description": "Operation timeout. The specified time-out period was reached according to the conditions.\n"
},
{
"description": "The FTP PORT command returned error",
"code": 30,
"name": "CURLE_FTP_PORT_FAILED",
"long_description": "The FTP PORT command returned error. This mostly happens when you haven't specified a good enough address for libcurl to use. See <a Class=\"emphasis\" href=\"./CURLOPT_FTPPORT.html\">CURLOPT_FTPPORT</a>.\n"
},
{
"description": "The FTP REST command returned error",
"code": 31,
"name": "CURLE_FTP_COULDNT_USE_REST",
"long_description": "The FTP REST command returned error. This should never happen if the server is sane.\n"
},
{
"description": "The server does not support or accept range requests",
"code": 33,
"name": "CURLE_RANGE_ERROR",
"long_description": "The server does not support or accept range requests.\n"
},
{
"description": "This is an odd error that mainly occurs due to internal confusion",
"code": 34,
"name": "CURLE_HTTP_POST_ERROR",
"long_description": "This is an odd error that mainly occurs due to internal confusion.\n"
},
{
"description": "A problem occurred somewhere in the SSL/TLS handshake",
"code": 35,
"name": "CURLE_SSL_CONNECT_ERROR",
"long_description": "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.\n"
},
{
"description": "The download could not be resumed because the specified offset was out of the file boundary",
"code": 36,
"name": "CURLE_BAD_DOWNLOAD_RESUME",
"long_description": "The download could not be resumed because the specified offset was out of the file boundary.\n"
},
{
"description": "A file given with FILE:// couldn't be opened",
"code": 37,
"name": "CURLE_FILE_COULDNT_READ_FILE",
"long_description": "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?\n"
},
{
"description": "LDAP cannot bind",
"code": 38,
"name": "CURLE_LDAP_CANNOT_BIND",
"long_description": "LDAP cannot bind. LDAP bind operation failed.\n"
},
{
"description": "LDAP search failed",
"code": 39,
"name": "CURLE_LDAP_SEARCH_FAILED",
"long_description": "LDAP search failed.\n"
},
{
"description": "Function not found",
"code": 41,
"name": "CURLE_FUNCTION_NOT_FOUND",
"long_description": "Function not found. A required zlib function was not found.\n"
},
{
"description": "Aborted by callback",
"code": 42,
"name": "CURLE_ABORTED_BY_CALLBACK",
"long_description": "Aborted by callback. A callback returned \"abort\" to libcurl.\n"
},
{
"description": "Internal error",
"code": 43,
"name": "CURLE_BAD_FUNCTION_ARGUMENT",
"long_description": "Internal error. A function was called with a bad parameter.\n"
},
{
"description": "Interface error",
"code": 45,
"name": "CURLE_INTERFACE_FAILED",
"long_description": "Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with <a Class=\"emphasis\" href=\"./CURLOPT_INTERFACE.html\">CURLOPT_INTERFACE</a>.\n"
},
{
"description": "Too many redirects",
"code": 47,
"name": "CURLE_TOO_MANY_REDIRECTS",
"long_description": "Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with <a Class=\"emphasis\" href=\"./CURLOPT_MAXREDIRS.html\">CURLOPT_MAXREDIRS</a>.\n"
},
{
"description": "An option passed to libcurl is not recognized/known",
"code": 48,
"name": "CURLE_UNKNOWN_OPTION",
"long_description": "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.\n"
},
{
"description": "A telnet option string was Illegally formatted",
"code": 49,
"name": "CURLE_TELNET_OPTION_SYNTAX",
"long_description": "A telnet option string was Illegally formatted.\n"
},
{
"description": "The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK",
"code": 51,
"name": "CURLE_PEER_FAILED_VERIFICATION",
"long_description": "The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.\n"
},
{
"description": "Nothing was returned from the server, and under the circumstances, getting nothing is considered an error",
"code": 52,
"name": "CURLE_GOT_NOTHING",
"long_description": "Nothing was returned from the server, and under the circumstances, getting nothing is considered an error.\n"
},
{
"description": "The specified crypto engine wasn't found",
"code": 53,
"name": "CURLE_SSL_ENGINE_NOTFOUND",
"long_description": "The specified crypto engine wasn't found.\n"
},
{
"description": "Failed setting the selected SSL crypto engine as default!",
"code": 54,
"name": "CURLE_SSL_ENGINE_SETFAILED",
"long_description": "Failed setting the selected SSL crypto engine as default!\n"
},
{
"description": "Failed sending network data",
"code": 55,
"name": "CURLE_SEND_ERROR",
"long_description": "Failed sending network data.\n"
},
{
"description": "Failure with receiving network data",
"code": 56,
"name": "CURLE_RECV_ERROR",
"long_description": "Failure with receiving network data.\n"
},
{
"description": "problem with the local client certificate",
"code": 58,
"name": "CURLE_SSL_CERTPROBLEM",
"long_description": "problem with the local client certificate.\n"
},
{
"description": "Couldn't use specified cipher",
"code": 59,
"name": "CURLE_SSL_CIPHER",
"long_description": "Couldn't use specified cipher.\n"
},
{
"description": "Peer certificate cannot be authenticated with known CA certificates",
"code": 60,
"name": "CURLE_SSL_CACERT",
"long_description": "Peer certificate cannot be authenticated with known CA certificates.\n"
},
{
"description": "Unrecognized transfer encoding",
"code": 61,
"name": "CURLE_BAD_CONTENT_ENCODING",
"long_description": "Unrecognized transfer encoding.\n"
},
{
"description": "Invalid LDAP URL",
"code": 62,
"name": "CURLE_LDAP_INVALID_URL",
"long_description": "Invalid LDAP URL.\n"
},
{
"description": "Maximum file size exceeded",
"code": 63,
"name": "CURLE_FILESIZE_EXCEEDED",
"long_description": "Maximum file size exceeded.\n"
},
{
"description": "Requested FTP SSL level failed",
"code": 64,
"name": "CURLE_USE_SSL_FAILED",
"long_description": "Requested FTP SSL level failed.\n"
},
{
"description": "When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed",
"code": 65,
"name": "CURLE_SEND_FAIL_REWIND",
"long_description": "When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed.\n"
},
{
"description": "Initiating the SSL Engine failed",
"code": 66,
"name": "CURLE_SSL_ENGINE_INITFAILED",
"long_description": "Initiating the SSL Engine failed.\n"
},
{
"description": "The remote server denied curl to login ",
"code": 67,
"name": "CURLE_LOGIN_DENIED",
"long_description": "The remote server denied curl to login (Added in 7.13.1)\n"
},
{
"description": "File not found on TFTP server",
"code": 68,
"name": "CURLE_TFTP_NOTFOUND",
"long_description": "File not found on TFTP server.\n"
},
{
"description": "Permission problem on TFTP server",
"code": 69,
"name": "CURLE_TFTP_PERM",
"long_description": "Permission problem on TFTP server.\n"
},
{
"description": "Out of disk space on the server",
"code": 70,
"name": "CURLE_REMOTE_DISK_FULL",
"long_description": "Out of disk space on the server.\n"
},
{
"description": "Illegal TFTP operation",
"code": 71,
"name": "CURLE_TFTP_ILLEGAL",
"long_description": "Illegal TFTP operation.\n"
},
{
"description": "Unknown TFTP transfer ID",
"code": 72,
"name": "CURLE_TFTP_UNKNOWNID",
"long_description": "Unknown TFTP transfer ID.\n"
},
{
"description": "File already exists and will not be overwritten",
"code": 73,
"name": "CURLE_REMOTE_FILE_EXISTS",
"long_description": "File already exists and will not be overwritten.\n"
},
{
"description": "This error should never be returned by a properly functioning TFTP server",
"code": 74,
"name": "CURLE_TFTP_NOSUCHUSER",
"long_description": "This error should never be returned by a properly functioning TFTP server.\n"
},
{
"description": "Character conversion failed",
"code": 75,
"name": "CURLE_CONV_FAILED",
"long_description": "Character conversion failed.\n"
},
{
"description": "Caller must register conversion callbacks",
"code": 76,
"name": "CURLE_CONV_REQD",
"long_description": "Caller must register conversion callbacks.\n"
},
{
"description": "Problem with reading the SSL CA cert (path? access rights?)",
"code": 77,
"name": "CURLE_SSL_CACERT_BADFILE",
"long_description": "Problem with reading the SSL CA cert (path? access rights?)\n"
},
{
"description": "The resource referenced in the URL does not exist",
"code": 78,
"name": "CURLE_REMOTE_FILE_NOT_FOUND",
"long_description": "The resource referenced in the URL does not exist.\n"
},
{
"description": "An unspecified error occurred during the SSH session",
"code": 79,
"name": "CURLE_SSH",
"long_description": "An unspecified error occurred during the SSH session.\n"
},
{
"description": "Failed to shut down the SSL connection",
"code": 80,
"name": "CURLE_SSL_SHUTDOWN_FAILED",
"long_description": "Failed to shut down the SSL connection.\n"
},
{
"description": "Socket is not ready for send/recv wait till it's ready and try again",
"code": 81,
"name": "CURLE_AGAIN",
"long_description": "Socket is not ready for send/recv wait till it's ready and try again. This return code is only returned from <a Class=\"emphasis\" href=\"./curl_easy_recv.html\">curl_easy_recv</a> and <a Class=\"emphasis\" href=\"./curl_easy_send.html\">curl_easy_send</a> (Added in 7.18.2)\n"
},
{
"description": "Failed to load CRL file ",
"code": 82,
"name": "CURLE_SSL_CRL_BADFILE",
"long_description": "Failed to load CRL file (Added in 7.19.0)\n"
},
{
"description": "Issuer check failed ",
"code": 83,
"name": "CURLE_SSL_ISSUER_ERROR",
"long_description": "Issuer check failed (Added in 7.19.0)\n"
},
{
"description": "The FTP server does not understand the PRET command at all or does not support the given argument",
"code": 84,
"name": "CURLE_FTP_PRET_FAILED",
"long_description": "The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using <a Class=\"emphasis\" href=\"./CURLOPT_CUSTOMREQUEST.html\">CURLOPT_CUSTOMREQUEST</a>, a custom LIST command will be sent with PRET CMD before PASV as well. (Added in 7.20.0)\n"
},
{
"description": "Mismatch of RTSP CSeq numbers",
"code": 85,
"name": "CURLE_RTSP_CSEQ_ERROR",
"long_description": "Mismatch of RTSP CSeq numbers.\n"
},
{
"description": "Mismatch of RTSP Session Identifiers",
"code": 86,
"name": "CURLE_RTSP_SESSION_ERROR",
"long_description": "Mismatch of RTSP Session Identifiers.\n"
},
{
"description": "Unable to parse FTP file list (during FTP wildcard downloading)",
"code": 87,
"name": "CURLE_FTP_BAD_FILE_LIST",
"long_description": "Unable to parse FTP file list (during FTP wildcard downloading).\n"
},
{
"description": "Chunk callback reported error",
"code": 88,
"name": "CURLE_CHUNK_FAILED",
"long_description": "Chunk callback reported error.\n"
},
{
"description": "(For internal use only, will never be returned by libcurl) No connection available, the session will be queued",
"code": 89,
"name": "CURLE_NO_CONNECTION_AVAILABLE",
"long_description": "(For internal use only, will never be returned by libcurl) No connection available, the session will be queued. (added in 7.30.0)\n"
},
{
"description": "Failed to match the pinned key specified with CURLOPT_PINNEDPUBLICKEY",
"code": 90,
"name": "CURLE_SSL_PINNEDPUBKEYNOTMATCH",
"long_description": "Failed to match the pinned key specified with <a Class=\"emphasis\" href=\"./CURLOPT_PINNEDPUBLICKEY.html\">CURLOPT_PINNEDPUBLICKEY</a>.\n"
},
{
"description": "Status returned failure when asked with CURLOPT_SSL_VERIFYSTATUS",
"code": 91,
"name": "CURLE_SSL_INVALIDCERTSTATUS",
"long_description": "Status returned failure when asked with <a Class=\"emphasis\" href=\"./CURLOPT_SSL_VERIFYSTATUS.html\">CURLOPT_SSL_VERIFYSTATUS</a>.\n"
}
]
from __future__ import print_function
import json
import re
import sys
import requests
def gen_shell_script(data):
with open('curl_exit_codes.sh', 'w') as file:
print('#!/usr/bin/env bash', file=file)
print('curl -s -O http://foo/foo.zip', file=file)
print('case $? in', file=file)
for e in data:
desc = e['description'].replace("'", "''")
print(" {}) message='{}' ;;".format(e['code'], desc), file=file)
print(" *) message='Unknown error code'", file=file)
print('esac', file=file)
print('echo $message', file=file)
def main(argv):
seen = []
data = []
r = requests.get('http://curl.haxx.se/libcurl/c/libcurl-errors.html')
matches = re.findall(r'([0-9A-Z_]+)\s\((\d+)\).*?level1">(.*?)<p', r.text, re.DOTALL)
for match in matches:
code = int(match[1])
if code in seen:
continue
seen.append(code)
name = match[0]
raw_description = match[2]
description = re.sub(r'<[^>]+>', '', raw_description)
m = re.match(r'(.*?)(\n|\.|\(Added)', description, re.DOTALL)
if m:
short_description = m.group(1)
else:
short_description = description
data.append({'code': code, 'name': name, 'long_description': raw_description,
'description': short_description})
with open('curl_exit_codes.json', 'w') as file:
json.dump(data, file, indent=2)
gen_shell_script(data)
if __name__ == '__main__':
main(sys.argv)
#!/usr/bin/env bash
curl -s -O http://foo/foo.zip
case $? in
0) message='All fine' ;;
1) message='The URL you passed to libcurl used a protocol that this libcurl does not support' ;;
2) message='Very early initialization code failed' ;;
3) message='The URL was not properly formatted' ;;
4) message='A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision' ;;
5) message='Couldn''t resolve proxy' ;;
6) message='Couldn''t resolve host' ;;
7) message='Failed to connect() to host or proxy' ;;
8) message='After connecting to a FTP server, libcurl expects to get a certain reply back' ;;
9) message='We were denied access to the resource given in the URL' ;;
10) message='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' ;;
11) message='After having sent the FTP password to the server, libcurl expects a proper reply' ;;
12) message='During an active FTP session while waiting for the server to connect, the CURLOPT_ACCEPTTIMEOUT_MS (or the internal default) timeout expired' ;;
13) message='libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command' ;;
14) message='FTP servers return a 227-line as a response to a PASV command' ;;
15) message='An internal failure to lookup the host used for the new connection' ;;
16) message='A problem was detected in the HTTP2 framing layer' ;;
17) message='Received an error when trying to set the transfer mode to binary or ASCII' ;;
18) message='A file transfer was shorter or larger than expected' ;;
19) message='This was either a weird reply to a ''RETR'' command or a zero byte transfer complete' ;;
21) message='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' ;;
22) message='This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is &gt;= 400' ;;
23) message='An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback' ;;
25) message='Failed starting the upload' ;;
26) message='There was a problem reading a local file or an error returned by the read callback' ;;
27) message='A memory allocation request failed' ;;
28) message='Operation timeout' ;;
30) message='The FTP PORT command returned error' ;;
31) message='The FTP REST command returned error' ;;
33) message='The server does not support or accept range requests' ;;
34) message='This is an odd error that mainly occurs due to internal confusion' ;;
35) message='A problem occurred somewhere in the SSL/TLS handshake' ;;
36) message='The download could not be resumed because the specified offset was out of the file boundary' ;;
37) message='A file given with FILE:// couldn''t be opened' ;;
38) message='LDAP cannot bind' ;;
39) message='LDAP search failed' ;;
41) message='Function not found' ;;
42) message='Aborted by callback' ;;
43) message='Internal error' ;;
45) message='Interface error' ;;
47) message='Too many redirects' ;;
48) message='An option passed to libcurl is not recognized/known' ;;
49) message='A telnet option string was Illegally formatted' ;;
51) message='The remote server''s SSL certificate or SSH md5 fingerprint was deemed not OK' ;;
52) message='Nothing was returned from the server, and under the circumstances, getting nothing is considered an error' ;;
53) message='The specified crypto engine wasn''t found' ;;
54) message='Failed setting the selected SSL crypto engine as default!' ;;
55) message='Failed sending network data' ;;
56) message='Failure with receiving network data' ;;
58) message='problem with the local client certificate' ;;
59) message='Couldn''t use specified cipher' ;;
60) message='Peer certificate cannot be authenticated with known CA certificates' ;;
61) message='Unrecognized transfer encoding' ;;
62) message='Invalid LDAP URL' ;;
63) message='Maximum file size exceeded' ;;
64) message='Requested FTP SSL level failed' ;;
65) message='When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed' ;;
66) message='Initiating the SSL Engine failed' ;;
67) message='The remote server denied curl to login ' ;;
68) message='File not found on TFTP server' ;;
69) message='Permission problem on TFTP server' ;;
70) message='Out of disk space on the server' ;;
71) message='Illegal TFTP operation' ;;
72) message='Unknown TFTP transfer ID' ;;
73) message='File already exists and will not be overwritten' ;;
74) message='This error should never be returned by a properly functioning TFTP server' ;;
75) message='Character conversion failed' ;;
76) message='Caller must register conversion callbacks' ;;
77) message='Problem with reading the SSL CA cert (path? access rights?)' ;;
78) message='The resource referenced in the URL does not exist' ;;
79) message='An unspecified error occurred during the SSH session' ;;
80) message='Failed to shut down the SSL connection' ;;
81) message='Socket is not ready for send/recv wait till it''s ready and try again' ;;
82) message='Failed to load CRL file ' ;;
83) message='Issuer check failed ' ;;
84) message='The FTP server does not understand the PRET command at all or does not support the given argument' ;;
85) message='Mismatch of RTSP CSeq numbers' ;;
86) message='Mismatch of RTSP Session Identifiers' ;;
87) message='Unable to parse FTP file list (during FTP wildcard downloading)' ;;
88) message='Chunk callback reported error' ;;
89) message='(For internal use only, will never be returned by libcurl) No connection available, the session will be queued' ;;
90) message='Failed to match the pinned key specified with CURLOPT_PINNEDPUBLICKEY' ;;
91) message='Status returned failure when asked with CURLOPT_SSL_VERIFYSTATUS' ;;
*) message='Unknown error code'
esac
echo $message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment