No error kind returned when network connection not available

Bug #1794006 reported by Robert Ancell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
High
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 https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io on 127.0.0.53:53: 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.

https://github.com/snapcore/snapd/pull/6919

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

That is the pull request of this issue.

https://github.com/snapcore/snapd/pull/7050

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.