Add dedicated error when no connection

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-04-20 12:09:54 -07:00
parent 05063570c5
commit ca4d14ca13

View File

@@ -84,6 +84,10 @@ RETURNING
updated_at
`
if c.Connection == nil {
return fmt.Errorf("connection is nil")
}
connection, err := json.Marshal(c.Connection)
if err != nil {
return fmt.Errorf("cannot marshal connection: %w", err)