Skip to content

Improve "invalid macaroon signature" error #9018

Closed
@di

Description

@di

Right now, an API token can fail for a number of reasons, most of which produce an "invalid macaroon signature" exception.

https://github.com/pypa/warehouse/blob/aafc5185e57e67d43487ce4faa95913dd4573e14/warehouse/macaroons/caveats.py#L93

Common issues that could use more detailed error messages:

  • the API token is scoped for a different project than it's being used for
  • the API token is malformed and cannot be deserialized
  • the API token doesn't begin with pypi-
  • (probably more)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions