← Back to issue list

storeapi: log responses and registration error code

View original Github issue

Metadata

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

Current evaluation

Merged. Adds debug logging for store API responses and improves registration error code output. The minimal change (+16/-5 lines, 4 files) passed CI, achieved 100% coverage, and was approved for backporting.

Suggested action:

No scores available.

Issue body

All responses are now logged in debug mode (response.text) and the error code is properly printed out on registration errors. 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`? ----- A very minimal change PR in case we need to cherry pick it to an older release

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Adds debug logging for store API responses and improves registration error code output. The minimal change (+16/-5 lines, 4 files) passed CI, achieved 100% coverage, and was approved for backporting.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Implements debug logging for API responses and prints registration error codes. The minimal change is marked for potential cherry-picking to older releases and increased unit test coverage by 0.24%.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Adds debug logging for API responses and prints registration error codes. Intended as a minimal change for potential cherry-picking to older releases. Coverage increased by 0.24%.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3667 storeapi: fix typo snapcraft merged Merged a single-line typo correction in the storeapi module. Approved by a reviewer, passed CI, and increased test coverage by 0.07%.
76%
#2116 storeapi: handle 5xx error codes for all store endpoints snapcraft merged Merged robust 5xx error handling across all store API endpoints. Fixes Launchpad bug #1768370 by generalizing release-specific error handling. Approved by two reviewers and passed CI checks.
75%
#3124 storeapi: update api and error messages from push to upload snapcraft merged Merged updates to the storeapi module replacing push terminology with upload in API calls and error messages. Approved by one reviewer, modifying 10 files with 126 additions and 146 deletions.
74%
#2749 storeapi: add StoreErrorList to handle store errors snapcraft merged 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).
73%
#3442 storeapi: reduce the amount of constants and their meaning snapcraft merged Merged after review and CI approval. Simplified storeapi URL constants to root URLs only, using full endpoint paths directly. Renamed constants for backend alignment, reducing 55 lines across 13 files.
72%
#2059 storeapi: handle 500 error response when releasing snap snapcraft merged Merged fix that properly handles 500 HTML error responses from the store during snap release. Adds debug logging for store errors to streamline future troubleshooting. Approved by reviewer and passed CI checks.
71%
#2094 storeapi: better handle network errors and retries snapcraft merged Resolves Launchpad bug #1765671 by improving storeapi network error handling. Sets urllib log level to ERROR and properly manages max retry failures, eliminating verbose warnings and tracebacks. Approved and merged after passing CI.
71%
#750 storeapi: remove dependency on the 'success' attr snapcraft merged Merged to remove the 'success' attribute dependency in storeapi, resolving LP: #1615786 and LP: #1611116. Approved by kyrofa, the update modifies 6 files with +75/-37 lines.
71%
#1936 storeapi: handle errors even for >400 responses snapcraft merged Merged PR resolves Launchpad bug #1736963 by fixing storeapi error handling for HTTP responses over 400. Bypasses the requests library __bool__ quirk to ensure proper error messages display for failed API calls. Approved and passed CI.
71%
#323 storeapi: reduce the mccabe complexity snapcraft merged Merged to reduce McCabe complexity in the storeapi module. The change modified three files, adding 89 and removing 78 lines. Approved by sergiusens, the author indicated subsequent work to replace static checks with flake8.
71%