fix: catch credential decoding errors
Metadata
Current evaluation
PR #287 merged to main as commit a4a21e6: auth.decode_credentials now catches UnicodeDecodeError alongside binascii.Error and raises CredentialsNotParseable, giving a user-friendly error for corrupt credentials files. Fixes snapcraft#5161.
Resolution: closed resolved
Reason: Merged by maintainer mr-cal (2 approvals, all CI green) and landed as commit a4a21e6 'fix: catch credential decoding errors'. The change is visible in craft_store/auth.py, where decode_credentials catches (binascii.Error, UnicodeDecodeError) and raises errors.CredentialsNotParseable; it was picked up by canonical/snapcraft#5536.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | PR #287 merged to main as commit a4a21e6: auth.decode_credentials now catches UnicodeDecodeError alongside binascii.Error and raises CredentialsNotParseable, giving a user-friendly error for corrupt credentials files. Fixes snapcraft#5161. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/craft-store#287 as commit a4a21e6, catching credentials-file UnicodeDecodeError and reporting a user-friendly error; integrated by snapcraft#5536. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix catching UnicodeDecodeError during credentials file parsing, replacing the crash with a user-friendly error. Approved by two reviewers, passed all CI checks, and resolves issue #5161. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#5536
(confidence 88%)
Referenced in the PR body as the downstream PR that integrated the fix; resolves snapcraft#5161 (the 'snapcraft internal error: UnicodeDecodeError' report).
-
Likely Fixed By:
canonical/snapcraft#5161
(confidence 85%)
Original snapcraft issue reporting the unhandled UnicodeDecodeError from the credentials file, fixed by this craft-store PR.
-
Related To:
canonical/craft-store#45
(confidence 45%)
Earlier PR whose commit f985651 'auth: raise error when credentials cannot be parsed' introduced CredentialsNotParseable, the error type now raised for decode failures.
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. |