Generic error message when registering snap names longer than allowed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Store Server |
Fix Released
|
Undecided
|
Unassigned | ||
Snapcraft |
Fix Released
|
High
|
Celso Providelo |
Bug Description
The current response from the (staging) Store API does not comply with the existing error pattern (particularly, top-level "code" attribute is empty):
{{{
$ snapcraft staging servers> PYTHONPATH=. ./snapcraft/main.py register name-tooooooooo
Starting snapcraft 2.28 from ./snapcraft.
Registering name-tooooooooo
Starting new HTTPS connection (1): myapps.
"POST /dev/api/
=======
{'detail': 'Submitted data is not valid.', 'title': 'Invalid request.', 'invalid_params': [{'code': '', 'reason': 'The name name-tooooooooo
=======
Traceback (most recent call last):
File "./snapcraft/
main() # pragma: no cover
File "./snapcraft/
return run(args, project_options)
File "./snapcraft/
_run_
File "./snapcraft/
snapcraft.
File "/home/
store.
File "/home/
self.
File "/home/
return func(*args, **kwargs)
File "/home/
raise errors.
snapcraft.
}}}
Obs: error response printed with locally patched snapcraft.
Changed in snapstore: | |
status: | New → Confirmed |
Changed in snapcraft: | |
milestone: | none → 2.29 |
status: | New → Fix Committed |
assignee: | nobody → Celso Providelo (cprov) |
importance: | Undecided → High |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
Partial snapcraft PR in https:/ /github. com/snapcore/ snapcraft/ pull/1247