Upload icon returns KeyError: u'icon'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Store Server |
Fix Released
|
Undecided
|
Matias Bordese |
Bug Description
API returns KeyError: u'icon' when uploading an non valid icon to a snap that already has an icon.
You can find the issue on sentry: https:/
# Step to reproduce
- Have a snap with a existing icon
- Upload an image too big (example: https:/
- API returns: `{'error_list': [{'message': "KeyError: u'icon'", 'code': 'internal-
# Excpected behaviour
- Have a snap with a existing icon
- Upload an image too big (example: https:/
- API returns: `{'error_list': [{'message': 'Image must be exactly 256x256 pixels in size.', 'code': 'invalid-field', 'extra': {'field': 'icon', 'value': 'blue.png', 'size': 256}}]}`
Changed in snapstore: | |
status: | Incomplete → Confirmed |
Changed in snapstore: | |
assignee: | nobody → Matias Bordese (matiasb) |
Changed in snapstore: | |
status: | Confirmed → In Progress |
Changed in snapstore: | |
status: | In Progress → Fix Committed |
Changed in snapstore: | |
status: | Fix Committed → Fix Released |
Hello,
When you "Upload an image too big", you're hitting this endpoint:
https:/ /dashboard. snapcraft. io/dev/ api/snaps/<your_snap_ id>/binary- metadata
Could you perhaps somehow obtain the payload you're sending to this endpoint? I don't think I need the full binary parts for the actual icons, so if you want to elide that, that should be fine.
I tried your repro case and got the expected behavior, so something else is at play here.