-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Can we improve the "Failed writing body" error message? #5594
Comments
#2030 sounds similar |
The code that writes the error message has no clue where the write was done so it can't say "pipe" because it could've been a buffer or a file. Would |
Hello Badger, Yes, that sure sounds better, even better is to put Curl in the message. Saw saw this on a terminal, had no idea where it came from. Maybe "Curl failed to write data to destination" ? May I ask, what is the exact writing error, EIO? |
We can't do that, this is libcurl creating the error and libcurl is also used by hundreds of other applications than curl. But really, curl already prefixes the error message with
|
In your particular use case it is |
Is this better?
|
Replace "Failed writing body (X != Y)" with "Failed writing response data to the destination" Reported-by: coinhubs on github Fixes #5594
Hello badger Yes, this looks better. My only feedback is in relation to the English. "the" is not necessary in the message. "Failure" is the way we would write in English. I'd probably leave out "data" as well ie. "curl: Failure writing output to destination" Any idea what the error code 23 is? |
All curl error messages are shown like that. The number within parenthesis is the numerical error it returns. |
Ah, ok, now I understand CURLE_WRITE_ERROR (23) I read here online: I'd be happy to see CURLE_WRITE_ERROR or other error enum. Is that what curl_easy_strerror() returns? |
The error codes from curl, the command line tool, is described in the man page for curl. At the end of it:
|
Many thanks for your reply. The difficulty is when the line appears in a log or stdout : My program output I can't figure-out where that came from, unless it has a "curl" prefix, as it all just went to stdout. eg $ cd missing_dir Thank you again for making this change to improve this |
Again: curl does this. Let me show you an example with curl 7.68.0:
|
I see, I'm sure it's a problem in my environment then. Thank you again for your reply. And developing such a useful tool! |
Asking support question in an issue we closed a year ago is not the way at least. |
Could the "(23) Failed writing body" be more descriptive? Was wondering if this 23 ENFILE?
From reading online it looks like the pipe might have been closed too soon, so maybe that could be clearer
https://stackoverflow.com/questions/16703647/why-does-curl-return-error-23-failed-writing-body
Sorry I'm not using a dev build, I saw there was a similar fix in this area in Feb 2020.
I did this
$ curl -Is https://www.google.com |head -1
HTTP/2 200
(23) Failed writing body
I expected the following
HTTP/2 200
curl/libcurl version
[curl -V output]
$ curl -V
curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-0
operating system
Latest Ubuntu LTS
The text was updated successfully, but these errors were encountered: