Skip to content

Commit

Permalink
feat: handle insert into database error
Browse files Browse the repository at this point in the history
  • Loading branch information
restanrm committed May 13, 2022
1 parent 62cfd60 commit 209d003
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion grpcv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ func (api headscaleV1APIServer) SetTags(
}
}

api.h.SetTags(machine, request.GetTags())
err = api.h.SetTags(machine, request.GetTags())
if err != nil {
return &v1.SetTagsResponse{
Machine: nil,
}, status.Error(codes.Internal, err.Error())
}

log.Trace().
Str("machine", machine.Name).
Expand Down

0 comments on commit 209d003

Please sign in to comment.