Yarn: Perform retry for 50x errors

Created on 20 Mar 2018  路  5Comments  路  Source: yarnpkg/yarn

Things like S3 has a possibility to return 50x errors temporarily.

https://registry.yarnpkg.com/@theia/file-search/-/file-search-0.4.0-next.bace685a.tgz: Request failed \"503 Service Unavailable\"

We should implement retry on 50x just as what we do for network errors, preferably with exponential backoff.

triaged

Most helpful comment

Facing the same issue | Yarn : v1.3.2 |

Fetching packages...
warning There appears to be trouble with our server. Retrying...
warning There appears to be trouble with our server. Retrying...
warning There appears to be trouble with our server. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.0.13.tgz: Request failed "500 Internal Server Error"".

All 5 comments

I think I was running yarn 1.x at that time and it seems that the patch wasn't working as intended.

This definitely still a problem, i'm getting annoying failures on CI builds...

An unexpected error occurred: "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-4.1.9.tgz: Request failed \"500 Internal Server Error\""

An unexpected error occurred: "https://registry.yarnpkg.com/@atlaskit/theme/-/theme-7.0.4.tgz: Request failed \"500 Internal Server Error\"".

and a couple more within the last few hours.

(Yarn 1.13.0)

Facing the same issue | Yarn : v1.3.2 |

Fetching packages...
warning There appears to be trouble with our server. Retrying...
warning There appears to be trouble with our server. Retrying...
warning There appears to be trouble with our server. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.0.13.tgz: Request failed "500 Internal Server Error"".

npm registry is having issues again today. It'd be great if yarn would implement retry behavior for 5xx errors.

$ yarn install
yarn install v1.19.0
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz: Request failed \"503 Service Unavailable\"".
Was this page helpful?
0 / 5 - 0 ratings