Check errors of more database calls

This commit is contained in:
Kristoffer Dalby committed 2022-05-30 15:39:24 +02:00
1 parent a1837a4d69
commit a09633e859
3 files changed
+28 -4

No files matched your search

+3 -1
View File
@@ -175,7 +175,9 @@ func (h *Headscale) setValue(key string, value string) error {
return nil
}
h.db.Create(keyValue)
if err := h.db.Create(keyValue).Error; err != nil {
return fmt.Errorf("failed to create key value pair in the database: %w", err)
}
return nil
}