Skip to content

Display name of error code instead of number #15473

@jeroen

Description

@jeroen

When the curl command line has an error, the numeric value of the error enum is printed, for example below (35):

curl "https://packages.r-universe.dev"
curl: (35) OpenSSL/3.3.2: error:0A000458:SSL routines::tlsv1 unrecognized name

This is too very informative. We can easily convert this into readable code using curl_easy_option_by_id(x)->name such that we get the string CURLE_SSL_CONNECT_ERROR, which is a bit more informative.

Would it be a suggestion to print the error name (minus the curle_ prefix) such that it would look like:

curl: (ssl_connect_error) OpenSSL/3.3.2: error:0A000458:SSL routines::tlsv1 unrecognized name

curl/libcurl version

curl 8.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions