Closed airhorns closed 2 years ago
I'm not sure I understand. calculateDelay
should not be called if the status code is 422, no?
Ok, it seems that got skips the retry if the backoff
value is 0
https://github.com/sindresorhus/got/blob/v11.8.5/source/core/index.ts#L2582-L2605 which is what retryObject.computedValue
holds when the status code is 422.
Thank you.
Fixes #547. During the code review of the retries PR, we ended up unifying the REST and GraphQL error handling logic, and also dropping the defensive bits that ensured the format of the errors object was checked before doing properties access. This restores the defensive checks since this code now needs to touch errors from the REST API which come in all sorts of shapes.