← Back to issue list

Fix formatting of some store errors

View original Github issue

Metadata

Project
snapcraft
Number
#2056
Type
pull request
State
merged
Author
cjwatson
Labels
Created
Updated
Closed

Current evaluation

Merged after PR #2050 landed first. Fixed SnapcraftError formatting that crashed __str__ on pre-formatted strings with braces. Author rebased and added tests for StoreReviewError and StoreMetadataError fixes. Approved and passed CI.

Suggested action:

No scores available.

Issue body

`SnapcraftError.fmt` is run through `str.format` by `SnapcraftError.__str__`, so it shouldn't itself be the output of a `str.format` operation. If it is, and the output contains `{}` (as for example if it contains raw JSON output), then `__str__` will raise an exception. LP: [#1761488](https://bugs.launchpad.net/bugs/1761488)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged after PR #2050 landed first. Fixed SnapcraftError formatting that crashed __str__ on pre-formatted strings with braces. Author rebased and added tests for StoreReviewError and StoreMetadataError fixes. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 Merged. Fixed a bug where pre-formatted SnapcraftError.fmt strings with braces caused exceptions. Overlapped with PR #2050; after it merged, the author rebased this PR, added tests for related store errors, and it was merged.
qwen3.6-35b-a3b-mtp-q6 Merged after rebasing PR #2050. Fixes a double-formatting bug in SnapcraftError.fmt that raised exceptions when error strings contained braces. Adds tests for StoreReviewError and StoreMetadataError, resolving LP #1761488.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1964 Fix Store integration tests with updated snap name registration error messages (take 2) snapcraft merged Merged after approval, updating Store integration tests to match new snap name registration error messages. Builds on PR #1963, modifying string literals across three files. Resolved with zero outstanding comments.
75%
#2299 docs: fix formatting issues charmcraft merged Merged documentation formatting fixes resolving local build errors. Approved by two reviewers with minimal changes (+3/-1 across two files). Merged despite failing snap-build CI checks.
72%
#3556 store: Add ReviewQueued status snapcraft merged Merged a fix adding ReviewQueued to the allowed status enum for store revisions. This resolves a schema validation error causing snapcraft list-revisions to fail when encountering the new status. Approved and passed CI.
71%
#1634 Push metadata to the Store. snapcraft merged Successfully merged changes to push snap metadata to the store. Resolved initial CI and CLA failures, updated error messages per reviewer feedback, replaced metadata terminology, and added integration tests. Approved by two reviewers.
70%
#1793 project: refactor storeapi snapcraft merged Merged refactoring that split three snapcraft.storeapi classes from __init__.py into separate modules. Approved by a reviewer, passed CI, and resolved commit sync and dependency issues prior to merge.
70%