From 34dba0ade864ee4bceb8cf7264c84c865ca828de Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Sat, 13 Nov 2021 15:24:32 -0500 Subject: [PATCH] Fix missing error check. --- namespaces.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/namespaces.go b/namespaces.go index dc034cb4..e5d17839 100644 --- a/namespaces.go +++ b/namespaces.go @@ -68,7 +68,10 @@ func (h *Headscale) DestroyNamespace(name string) error { return err } for _, p := range keys { - h.DestroyPreAuthKey(&p) + err = h.DestroyPreAuthKey(&p) + if err != nil { + return err + } } if result := h.db.Unscoped().Delete(&n); result.Error != nil {