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

Fix pnpm audit bad API response on private registry #5246

Merged
merged 8 commits into from Aug 23, 2022

Conversation

timtong1982
Copy link
Contributor

@timtong1982 timtong1982 commented Aug 22, 2022

  • Add new Error type: AuditEndpointNotExistsError
  • On AuditUrl returns 404, AuditEndpointNotExistsError will throw
  • When audit handler catches AuditEndpointNotExistsError, the command will return to avoid execute further codes
  • Unit test added

close #5200

@welcome
Copy link

welcome bot commented Aug 22, 2022

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

@timtong1982
Copy link
Contributor Author

#5200

@zkochan
Copy link
Member

zkochan commented Aug 22, 2022

In that issue you are saying that a 404 error should be treated differently. I don't see that here.

@timtong1982
Copy link
Contributor Author

In that issue you are saying that a 404 error should be treated differently. I don't see that here.

then we need expose the http status code all the way from packages/audit/src/index.ts

@timtong1982
Copy link
Contributor Author

In that issue you are saying that a 404 error should be treated differently. I don't see that here.

then we need expose the http status code all the way from packages/audit/src/index.ts

or create a new type of error

I will work on that

Copy link
Member

@zkochan zkochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run pnpm changeset in the root of the repository and describe your changes. The resulting files should be committed as they will be used during release.

@timtong1982
Copy link
Contributor Author

Run pnpm changeset in the root of the repository and describe your changes. The resulting files should be committed as they will be used during release.

Thanks, updated.

@zkochan zkochan added this to the v7.9 milestone Aug 23, 2022
@zkochan zkochan merged commit a12d1a0 into pnpm:main Aug 23, 2022
@welcome
Copy link

welcome bot commented Aug 23, 2022

Congrats on merging your first pull request! 🎉🎉🎉

This was referenced Aug 29, 2022
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

Successfully merging this pull request may close these issues.

pnpm audit  failed with: ERROR  Cannot read properties of undefined (reading 'metadata')
2 participants