diff --git a/namespaces.go b/namespaces.go index e109b9a7..4d996bb0 100644 --- a/namespaces.go +++ b/namespaces.go @@ -59,7 +59,7 @@ func (h *Headscale) DestroyNamespace(name string) error { } if result := h.db.Unscoped().Delete(&n); result.Error != nil { - return err + return result.Error } return nil