No error kind returned when network connection not available

Bug #1794006 reported by Robert Ancell
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Samuele Pedroni

Bug Description

If you attempt to install a snap without a network connection you get an error message without a code. This means a client can't determine the cause of the failure.

$ sudo curl --unix-socket /var/run/snapd.socket http://localhost/v2/snaps/hello-mdeslaur -d '{"action": "install"}'|jq .

  "type": "error",
  "status-code": 400,
  "status": "Bad Request",
  "result": {
    "message": "cannot install \"hello-mdeslaur\": Post dial tcp: lookup on server misbehaving"

Michael Vogt (mvo)
Changed in snapd:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Arda Güçlü (arda.guclu) wrote :

When there is no network connection, error message should mention about network connection problem.

Revision history for this message
Arda Güçlü (arda.guclu) wrote :

That is the pull request of this issue.

Changed in snapd:
assignee: nobody → Samuele Pedroni (pedronis)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.