--retry-all-errors doesn't retry 400 status code #6712
First up, thanks for curl it's awesome!
I did this
The endpoint returns a
After reading through the code I discovered that by adding
I expected the following
I expected the 400 response to be retried.
I think either a note in the docs for
New theory, I think to retry 400 response codes with
Maybe to be
I've never played in C but happy to have a go at this tweak and adding a test case for it.
Tested in debian sid docker container.
The text was updated successfully, but these errors were encountered:
HTTP status code errors (4xx,5xx) are not transfer errors so curl won't error unless you use --fail. That may need more presence in the documentation but I don't know where.
Makes sense to me, could be good to call this out in the man page under
I've put some possible changes in bold.
- Add a paragraph explaining that curl does not consider HTTP response errors as curl errors, and how that behavior can be modified by using --retry and --fail. The --retry-all-errors doc says "Retry on any error" which some users may find misleading without the added explanation. Ref: https://curl.se/docs/faq.html#Why_do_I_get_downloaded_data_eve Ref: https://curl.se/docs/faq.html#curl_doesn_t_return_error_for_HT Reported-by: Lawrence Gripper Fixes curl#6712 Closes #xxxx