← Back to issue list

Craft Store should raise a better exception if we get an un-decodable response from the server.

View original Github issue

Metadata

Project
craft-store
Number
#293
Type
issue
State
open
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Craft Store should raise a better exception if we get an un-decodable response from the server.

Suggested action: keep open

Reason: This is a valid bug report about error handling in the Craft Store client. The issue is from 445 days ago with no comments or labels, indicating it hasn't been triaged. However, the underlying problem (UnicodeDecodeError bubbling up instead of being converted to a StoreError) is still relevant and would improve the user experience when dealing with malformed server responses. The fix would be relatively straightforward - catching UnicodeDecodeError in the HTTP client or response handling and converting it to an appropriate StoreError subclass.

Impact: 40 Quick Win: 28.0 Staleness: 85 Complexity: 30 Confidence: 75 Support Request: 0

Issue body

### Bug Description It appears that if we get bad text from the store we'll just bubble up a `UnicodeDecodeError` - we should convert that into a `StoreError` of some kind. ### To Reproduce Not sure if it's reproducible reliably, but here: https://github.com/dell-esg/powerflex-cinder-charm/actions/runs/15607294154/job/43959689846 ### part yaml ```shell ``` ### Relevant log output ```shell snap/bin/charmcraft resource-revisions cinder-dell-powerflex sdc-deb-package charmcraft internal error: UnicodeDecodeError('utf-8', b'\x86\xdbi\xb3\xff\xe0\x8a\xd8nm\xca&\xfd\xd7\xa5\x95\xeb \xfe\x9a0z\xb7\xe5{\x19\xe8\xbd\xa7!j\xb9\xbfi\xcbb\xa2{?\xae\xe9\xec\xff^y\xf3\x9d{\xdb\xad8\xfe:\x1b\xff\x8d\xfc\xf3\xde:\xeb\x8du', 0, 1, 'invalid start byte') Full execution log: '/home/runner/.local/state/charmcraft/log/charmcraft-20250612-095333.234337.log' Error: The process '/snap/bin/charmcraft' failed with exit code 70 Error: Error: The process '/snap/bin/charmcraft' failed with exit code 70 at ExecState._setResult (/home/runner/work/_actions/canonical/charming-actions/2.6.2/dist/upload-charm/index.js:3950:25) at ExecState.CheckComplete (/home/runner/work/_actions/canonical/charming-actions/2.6.2/dist/upload-charm/index.js:3933:18) at ChildProcess. (/home/runner/work/_actions/canonical/charming-actions/2.6.2/dist/upload-charm/index.js:3827:27) at ChildProcess.emit (node:events:524:28) at maybeClose (node:internal/child_process:1104:16) at ChildProcess._handle.onexit (node:internal/child_process:304:5) ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 28.0
Staleness: 85
Complexity: 30
Confidence: 75
Support Request: 0
keep open Craft Store should raise a better exception if we get an un-decodable response from the server.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 20
Confidence: 70
Support Request: 5
needs triage Unhandled UnicodeDecodeError from store responses should be caught and converted to a StoreError. Open for over a year with no maintainer response, labels, or comments.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 15
Confidence: 80
Support Request: 10
needs triage Replaces raw UnicodeDecodeError with a proper StoreError when Craft Store returns un-decodable responses. Currently untriaged and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 10
Confidence: 80
Support Request: 0
needs triage Replace raw UnicodeDecodeError with a proper StoreError when the Craft Store returns un-decodable data. Open, inactive for over a year, with no comments. Needs triage and assignment to implement proper error handling.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.