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
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:
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:
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