Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Logging for Http Redirects to Package Content #762

Open
magleaso opened this issue Mar 26, 2024 · 0 comments
Open

Add Logging for Http Redirects to Package Content #762

magleaso opened this issue Mar 26, 2024 · 0 comments

Comments

@magleaso
Copy link

magleaso commented Mar 26, 2024

Npm does not log a line for http redirects on package download, so it is not possible to determine whether failures occur before or after being redirected to make a second request.

Azure Artifacts for example responds with a 303 redirect to Azure blob storage when npm requests a tgz file. If npm were to log a line with a 303 redirect and then another line for the subsequent request to storage, this would significantly improve debugging and allow users to determine if they are having connectivity/availability issues with the package repository or the underlying storage that is getting redirected to.

Example failure that cannot differentiate whether package repo or storage failed:

npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://pkgs.dev.azure.com/myOrg/project/_packaging/myPackageFeed/npm/registry/ansi-regex/-/ansi-regex-4.2.0.tgz failed, reason:
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant