Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display libcurl error code/message #310

Closed
fabricereix opened this issue Oct 20, 2021 · 1 comment · Fixed by #318
Closed

Display libcurl error code/message #310

fabricereix opened this issue Oct 20, 2021 · 1 comment · Fixed by #318
Labels
enhancement New feature or request
Milestone

Comments

@fabricereix
Copy link
Collaborator

Hurl should report exactly the same error message than curl when the error has been generated by libcurl.
This will make debugging/searching error easier,

For example:

curl: (6) Could not resolve host: unknown
$ echo GET http://unknown | hurl
error: Http Connection
  --> -:1:5
   |
 1 | GET http://unknown
   |     ^^^^^^^^^^^^^^ (6) Could not resolve host: unknown
   |
@fabricereix fabricereix added the enhancement New feature or request label Oct 20, 2021
@lepapareil
Copy link
Collaborator

lepapareil commented Oct 21, 2021

Displaying lib name causing the error would perhaps be useful for debugging, for example:

curl: (6) Could not resolve host: unknown
$ echo GET http://unknown | hurl
error: Http Connection
  --> -:1:5
   |
 1 | GET http://unknown
   |     ^^^^^^^^^^^^^^ libcurl: (6) Could not resolve host: unknown
   |

@fabricereix fabricereix added this to the 1.5.0 milestone Oct 21, 2021
@fabricereix fabricereix linked a pull request Oct 23, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants