No error kind returned when network connection not available

Bug #1794006 reported by Robert Ancell on 2018-09-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
High
Unassigned

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) on 2018-11-15
Changed in snapd:
status: New → Triaged
importance: Undecided → High
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

Arda Güçlü (arda.guclu) wrote :

That is the pull request of this issue.

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers