← Back to issue list

fix(cli): properly capture store errors

View original Github issue

Metadata

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

Current evaluation

Merged #4863 in commit 426df7ec3, restoring legacy-style store-error capture so store failures are no longer reported as Snapcraft internal errors.

Resolution: closed resolved

Reason: The approved PR was merged into Snapcraft as commit 426df7ec3, adding proper handling for raised store errors.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When raised they show up as a Snapcraft internal error if not properly handled. This is using the same logic as in legacy.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #4863 in commit 426df7ec3, restoring legacy-style store-error capture so store failures are no longer reported as Snapcraft internal errors.
stealth/space-bunny-alpha — closed resolved Merged PR #4863 (commit 426df7ec3) to capture CLI store errors using legacy handling, preventing them from being misreported as Snapcraft internal errors.
qwen/qwen3.6-35b-a3b — — Merged fix for CLI store error handling to prevent internal error misclassification. Applies legacy error capture logic across three files. Approved by two reviewers.
qwen3.6-35b-a3b-mtp-q6 — — Merged fix for CLI store error handling. Unhandled store errors previously triggered false internal error reports. The change applies legacy error capture logic to properly surface and process these errors.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#585 Improve the store errors returning exceptions snapcraft merged Merged in canonical/snapcraft#585 via commit ddbbdbd06, refactoring store error handling to raise exceptions and addressing LP #1594636.
77%
#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.
77%
#2056 Fix formatting of some store errors snapcraft merged PR #2056 by cjwatson merged as commit 1f90b2a91, fixing store error messages that were pre-formatted with str.format so raw JSON braces no longer crash SnapcraftError.__str__ (LP: #1761488).
75%
#1664716 store error list is ugly snapcraft (launchpad) closed Store error formatting improved in CLI. Resolved by error handling updates (e.g. PR #2056, commit 1f90b2a91). Maintainer confirmed Snapcraft now presents these errors better.
74%
#1765671 Strange technical error message when querying store snapcraft (launchpad) closed Fixed by snapcore/snapcraft#2094, merged as 0d8602cc5, improving handling and presentation of Store API network errors and retries.
73%
#6310 fix(store): raise error when upload processing status is 'error' snapcraft open Adds an explicit `status.get("code") == "error"` check to StoreClientCLI.notify_upload so `snapcraft upload --release` raises SnapcraftError instead of falsely printing a revision/released message, plus a unit test. Fixes #6299.
73%
#1627865 Snapcraft errors when releasing a snap snapcraft (launchpad) closed Resolved by improving snapcraft's error handling to check HTTP status codes before JSON decoding, alongside a fix for the underlying store race condition (bug #1610948).
73%
#2084 fix(store): better error message with fetch-lib charmcraft merged Merged as commit d0410f22, improving fetch-lib errors and resolving #1721/CRAFT-3352.
72%
#3744 cli: enable craft-store logging snapcraft merged Merged PR #3744 (commit 6f7e26e6a) enabled craft-store logging in the Snapcraft CLI; merge commit b5d3e916d.
71%
#1964 Fix Store integration tests with updated snap name registration error messages (take 2) snapcraft merged Merged in canonical/snapcraft#1964 as commit 44ecb321a, updating Store integration tests for new snap-name registration errors; it supersedes #1963.
70%