[feature request] fail on specific errors only
Tobias Wendorff via curl-users <[email protected]> Sun, 13 Oct 2024 22:52:57 +0200
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
Hi there, ### tl;dr At the moment `--fail-early` throws me out of the `--parallel` download with every error 404, even though this error often isn't that fatal. Adding a range of error codes to the `--fail` family could help here: ``` --fail 400-403,405- --fail-early 400-403,405- --fail-on-error 400-403,405- ``` Where `400-403` means `400, 401, 402, 403` and `405-` means `405, 406, 407, ...`. Alternatively: `--fail-early !404` for ignoring 404 (which might lead to problems in some shells). ### Detailed explaination The parameters `--fail` and `--fail-early` might be to strict for some situations. This has to do with the fact that 401 or 403 is often an actual reason to cancel a request, while error 404, for example, could still contain important information (for example an error message). It would therefore be great if you could choose which error codes lead to a cancellation. I'm aware that you could automate the whole thing using `--write-out` and shell scripting, but then you would not be able to benefit from the excellent `--parallel` function. Best regards, Tobias -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html