mirror of
https://github.com/acaloiaro/caddy-incus-upstreams
synced 2026-07-21 18:29:13 +00:00
fix: output errors
This commit is contained in:
parent
3ed68872c3
commit
a6cdcdaee5
1 changed files with 5 additions and 1 deletions
|
|
@ -148,6 +148,7 @@ func (u *Upstreams) provisionCandidates(ctx caddy.Context, conn incus.InstanceSe
|
|||
if err != nil {
|
||||
ctx.Logger().Error("unable to get full instance info",
|
||||
zap.String("instance_name", i.Name),
|
||||
zap.Error(err),
|
||||
)
|
||||
continue
|
||||
}
|
||||
|
|
@ -230,7 +231,10 @@ func (u *Upstreams) keepUpdated(ctx caddy.Context, conn incus.InstanceServer) {
|
|||
if _, err := listener.AddHandler([]string{"lifecycle"}, func(event api.Event) {
|
||||
metadata := &api.EventLifecycle{}
|
||||
if err := json.Unmarshal(event.Metadata, &metadata); err != nil {
|
||||
ctx.Logger().Debug("unable to marshal event metadata", zap.Any("event", event))
|
||||
ctx.Logger().Debug("unable to marshal event metadata",
|
||||
zap.Any("event", event),
|
||||
zap.Error(err),
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue