← Back to issue list

auth: raise error when credentials cannot be parsed (CRAFT-812)

View original Github issue

Metadata

Project
craft-store
Number
#45
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged. Replaces cryptic base64 decoding errors with a clear CredentialsNotParseable exception when invalid authentication credentials are provided to craft-store.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5536 fix(store): catch credential decoding errors snapcraft merged Merged fix that catches invalid SNAPCRAFT_STORE_CREDENTIALS decoding errors, replacing internal crashes with user-friendly messages. Updated craft-store dependency to 3.2.2 and resolved issue #5161.
75%
#75 auth: handle keyring unlocking errors craft-store merged Merged to address CRAFT-1622. Adds error handling for keyring unlocking failures by catching exceptions and raising appropriate Craft-store errors. Approved by two reviewers and passed CI.
72%
#287 fix: catch credential decoding errors craft-store merged 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.
72%
#6098 fix: Tweak error message about SNAPCRAFT_STORE_CREDENTIALS snapcraft merged Merged to clarify the ambiguous SNAPCRAFT_STORE_CREDENTIALS error message. The update explicitly states login fails while the variable is set, resolving user confusion. Approved by four reviewers and passed CI checks prior to merge.
72%
#39 auth: do not allow overwriting existing credentials (CRAFT-776) craft-store merged Prevents overwriting existing credentials in the authentication module. Merged following approval and passing CI checks, updating eight files with 72 additions and 18 deletions. Resolves CRAFT-776.
72%
#3945 requirements: craft-store 2.3.0 for new credentials snapcraft merged Merged a dependency update bumping craft-store to 2.3.0 for new credentials support. Approved by a maintainer, passed CI and tests, and merged into main with no coverage impact.
71%