Replies: 1 comment 4 replies
-
I’m in the same boat. I’m using this library in AWS Lambdas, and I would like to be able to retry this type of errors, just like GOT handles it (https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md). I believe KY should follow the same logic. By the way, @joolfe, were you able to solve this issue in some way? The documentation doesn’t seem to allow this clearly. Also, @sindresorhus or @szmarczak, do you have any insights or suggestions on this? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I'm trying to reproduce an error like 'ETIMEDOUT', 'ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND'... using nock and in got I remember to do something like
But doing the same with ky I'm not able to handle correctly in the catch block as the HTTPError has something like:
Is this the way to handle this type of errors in ky? using the
error.response.code
?Best regards
Beta Was this translation helpful? Give feedback.
All reactions