auth: raise error when credentials cannot be parsed (CRAFT-812)
Metadata
Current evaluation
Merged in canonical/craft-store#45 (commit f985651), replacing raw base64 decoding errors with CredentialsNotParseable; shipped in craft-store 2.0.1.
Resolution: closed resolved
Reason: PR canonical/craft-store#45 was merged as commit f985651, implementing issue canonical/craft-store#20 by raising CredentialsNotParseable for malformed credentials. The change was released in craft-store 2.0.1.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
`craft-store` to raise a more useful error when a credential is not parseable.
Previous Behavior:
```
> > CHARMCRAFT_AUTH='12345' charmcraft login
charmcraft internal error: Error('Invalid base64-encoded string: number of data characters (5) cannot be 1 more than a multiple of 4')
```
New Behavior:
```
> CHARMCRAFT_AUTH='12345' charmcraft login
charmcraft internal error: CredentialsNotParseable('Credentials could not be parsed.')
```
https://github.com/canonical/craft-store/issues/20
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/craft-store#45 (commit f985651), replacing raw base64 decoding errors with CredentialsNotParseable; shipped in craft-store 2.0.1. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged to replace a raw base64 error with the clearer CredentialsNotParseable error for unparseable craft-store credentials, implementing craft-store#20. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged changes to craft-store that replace cryptic base64 decoding errors with a clear CredentialsNotParseable exception for invalid credentials. Approved by one reviewer and passed CI. |
Update history
No update history recorded yet.
Related work
-
Duplicate Of:
canonical/craft-store#20
(confidence 100%)
The PR description explicitly links the change to issue #20.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5536 fix(store): catch credential decoding errors | snapcraft | merged | Merged in canonical/snapcraft#5536 (commit 3784560f3), converting malformed store credential decoding failures into a user-friendly error and updating craft-store. | |
| #3945 requirements: craft-store 2.3.0 for new credentials | snapcraft | merged | Merged #3945 into main as d33d61753, bumping craft-store to 2.3.0 to support the new credentials format. | |
| #70 auth: update stored authentication format | craft-store | merged | Merged in craft-store#70 (commit 3a95724), changing stored credentials to JSON type/value records while retaining backward compatibility for legacy authentication payloads. |