Check errors of more database calls
This commit is contained in:
parent
a1837a4d69
commit
a09633e859
3 changed files with 28 additions and 4 deletions
4
db.go
4
db.go
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue