豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

[NuGet.org Bug]: Improve push failure error message #10774

@joelverhagen

Description

@joelverhagen

Impact

It's more difficult to complete my work

Describe the bug

This is not dependent on #5818 but is related.

There are many reasons a package might fail push:

  • Missing API key
  • Invalid API key
  • Expired API key
  • ID is blocked by ID prefix reservation
  • Improper owner scope on the API key
  • Improper package ID scope on the API key
  • User is locked
  • Package is locked
  • Throttling
  • Package is signed but should not be (user has no registered certs but the new package is signed)
  • Package is unsigned but should be (user has registered certs but the new package is unsigned)

It's not always clear what the problem is or how to self resolve.

For example, when the package ID scope is wrong on your API key, this is the error message:

error: Response status code does not indicate success: 403 (The specified API key is invalid, has expired, or does not have permission to access the specified package.). 

This is too generic of a message!

We should go through each of the scenarios above and ensure the error message is unambiguous but also does not leak too much information.

Repro Steps

Create an API key with the wrong package ID scope (does not match the package to be pushed).
Push the package.
See the error.

Expected Behavior

The error message should be more clear. The user should know what to do to resolve their problem such as making the API key scope more generic or renaming their package.

Screenshots

No response

Additional Context and logs

No response

Metadata

Metadata

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions