Skip to content

Commit cff0be3

Browse files
author
hamistao
committed
lxd: Log error on resultErrListAppend
Signed-off-by: hamistao <pedro.ribeiro@canonical.com>
1 parent e49b748 commit cff0be3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lxd/instances_get.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/canonical/lxd/shared/api"
2626
"github.com/canonical/lxd/shared/entity"
2727
"github.com/canonical/lxd/shared/filter"
28+
"github.com/canonical/lxd/shared/logger"
2829
"github.com/canonical/lxd/shared/version"
2930
)
3031

@@ -304,6 +305,8 @@ func instancesGet(d *Daemon, r *http.Request) response.Response {
304305
}
305306

306307
resultErrListAppend := func(inst db.Instance, err error) {
308+
logger.Error("Failed getting instance info", logger.Ctx{"err": err, "project": inst.Project, "instance": inst.Name})
309+
307310
instFull := &api.InstanceFull{
308311
Instance: api.Instance{
309312
Name: inst.Name,

0 commit comments

Comments
 (0)