storeapi: handle 500 error response when releasing snap
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
- [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] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
This PR fixes LP: [#1750177](https://bugs.launchpad.net/snapstore/+bug/1750177) and #2028 by properly handling the store returning a 500 error formatted as HTML instead of a typical error response. It also starts printing store error responses when in debug mode in order to streamline such fixes in the future.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for handling 500 HTML error responses from the store during snap release. Adds debug logging for store errors. Review feedback on parameter passing was addressed prior to merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to resolve snap release failures triggered by 500 HTML error responses from the store. Addresses LP #1750177 and #2028 by properly parsing malformed errors and adds debug logging for future troubleshooting. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #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. | |
| #3550 storeapi: log responses and registration error code | snapcraft | merged | 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. |