← Back to issue list

store: improve error message for 401 error

View original Github issue

Metadata

Project
snapcraft
Number
#3907
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged #3907 in commit 8a854a8de, clarifying Store 401 errors and logging out legacy configparser credentials so the new client re-authenticates.

Resolution: closed resolved

Reason: PR #3907 was merged as commit 8a854a8de, adding clearer re-login guidance for unauthorized Store responses and forcing legacy credentials through the new client.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When the store returns a 401, Snapcraft tries to do the right thing to prompt for a new login, but the error messages where confusing for the cases it cannot, when this original code was added the concept of a legacy client was not in place. A logout is done to enforce using the new client if the credentials are the configparser based ones. LP: #1980533 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint`? - [x] Have you successfully run `pytest tests/unit`? ----- CRAFT-1181

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #3907 in commit 8a854a8de, clarifying Store 401 errors and logging out legacy configparser credentials so the new client re-authenticates.
stealth/space-bunny-alpha — closed resolved Merged PR #3907 improved Snapcraft’s store 401 error message and logs out legacy configparser credentials to force the new client.
stealth/space-bunny-alpha — closed resolved Merged #3907 (8a854a8de) improved store 401 errors, clarifying cases where re-login prompts fail and logging out configparser credentials to force the new client.
qwen/qwen3.6-35b-a3b — — Merged PR improving 401 error messaging in the store client. Forces logout for legacy configparser credentials to enforce the new client, resolving confusing prompts. Approved and merged by maintainer sergiusens.
qwen3.6-35b-a3b-mtp-q6 — — Merged into main. Improves store client 401 error messaging and forces logout for legacy configparser credentials to switch to the new auth client. Achieved 100% diff coverage, resolving LP #1980533 and CRAFT-1181.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3805 store: support configparser credentials snapcraft merged Merged #3805 as commit 515461e1f, adding store support for legacy ConfigParser credentials and converting them for store authentication.
72%