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
[BUG] npm doesn't log intermediate fetch retry failures #7371
Closed
2 tasks done
Labels
Comments
hashtagchris
added
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 10.x
labels
Apr 12, 2024
wraithgar
added
Priority 2
secondary priority issue
and removed
Needs Triage
needs review for next steps
labels
Apr 12, 2024
wraithgar
added a commit
to npm/make-fetch-happen
that referenced
this issue
Apr 30, 2024
Three commits: - **deps: add [email protected]** - **fix: log errors on retry** - **chore: fix linting in test files** Closes npm/cli#7371
wraithgar
added a commit
to npm/make-fetch-happen
that referenced
this issue
Apr 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm retries idempotent read requests to the registry (ref). But it doesn't log the intermediate errors, regardless of loglevel.
Logging every http response or network failure would aid investigations. For example, if
npm install
is slow, it would useful to know why initial attempts failed, and how long individual http requests took.Expected Behavior
Every http response or network failure is logged when the loglevel is
verbose
or higher.Steps To Reproduce
Intentionally using https://httpbin.org for fault injection. When the supplied package name,
503
, is appended to https://httpbin.org/status, that causes our "registry" to return a 503 status code, a retryable response.npm view 503 --loglevel silly --registry=https://httpbin.org/status --fetch-retries=2
(2 retries is the default)error 503 SERVICE UNAVAILABLE
. That's expected.503
http response is recorded. Log snippet:Environment
[email protected]
[email protected]
The text was updated successfully, but these errors were encountered: