← Back to issue list

storeapi: add StoreErrorList to handle store errors

View original Github issue

Metadata

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

Current evaluation

Merged in #2749 via commit ac2d48293, adding StoreErrorList and improving StorePushError handling for resource-not-found and resource-forbidden responses.

Resolution: closed resolved

Reason: PR #2749 was merged as commit ac2d48293, centralizing store errors and adding clear push guidance for missing snaps and forbidden revisions.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This class should make it easy to query the error listing and use the provided messages. It is meant to be used by composing in the corresponding error classes. This commit adds it to StorePushError. StorePushError now properly handles resource-not-found and resource-forbidden. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in #2749 via commit ac2d48293, adding StoreErrorList and improving StorePushError handling for resource-not-found and resource-forbidden responses.
stealth/space-bunny-alpha — closed resolved Merged #2749 (commit ac2d48293), adding StoreErrorList to centralize store errors and improve StorePushError handling for resource-not-found and resource-forbidden responses.
qwen/qwen3.6-35b-a3b — — Added StoreErrorList class to centralize store error handling. Updated StorePushError to correctly parse resource-not-found and resource-forbidden responses, displaying clear user messages. Merged after reviewer approval, changing six files (+106/-42).
qwen3.6-35b-a3b-mtp-q6 — — Merged. Added StoreErrorList class to standardize store API error handling, specifically improving resource-not-found and resource-forbidden messages in StorePushError. Review approved after verifying output format.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1705684 StorePushError doesn't grok the new store error responses snapcraft (launchpad) closed Fixed by merged PR #2749 (commit ac2d48293), which added StoreErrorList and updated StorePushError handling for structured store responses.
72%
#3124 storeapi: update api and error messages from push to upload snapcraft merged Merged in commit a1b8b6804, updating Store API calls and user-facing error messages from “push” terminology to “upload”.
70%
#1936 storeapi: handle errors even for >400 responses snapcraft merged Merged PR #1936 (688588a0d) fixed Store API error handling for HTTP responses above 400, preventing failed responses from being mistaken for missing responses.
70%