Option to not retry on timeout errors
I'm configuring requests for AWS lambda environment, and case is that:
I set timeout option to ensure it ends before allowed lambda invocation time ends (so I handle eventual timeout gently by rejecting lambda invocation with meaningful error), and automated retry after such timeout occurs is unwanted.
I'd like to have retries applied for case of temporary network or server unavailability errors.
Is there an option to achieve that?
You must not search for, open, fetch, view, or copy anything that could reveal this task's reference solution or upstream fix. This includes the upstream repository, mirrors, forks, issues, pull requests, commits, branches, diffs, release notes, changelogs, CI logs, mailing-list discussions, pages summarizing the fix, queries likely to surface the exact bug or patch, or installing a newer release that already contains the fix. Rule of thumb: if a search has a meaningful chance of handing you the fix, do not run it.
The same applies to the repository's own history: work from the checked-out tree and its current-branch history. Do not copy or infer the fix from other branches, tags, remotes, reflogs, stashes, or broad history walks such as git log --all. Ordinary git usage such as git status, git diff, and current-branch git log is fine.