Add dedicated error when no connection
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -84,6 +84,10 @@ RETURNING
|
|||||||
updated_at
|
updated_at
|
||||||
`
|
`
|
||||||
|
|
||||||
|
if c.Connection == nil {
|
||||||
|
return fmt.Errorf("connection is nil")
|
||||||
|
}
|
||||||
|
|
||||||
connection, err := json.Marshal(c.Connection)
|
connection, err := json.Marshal(c.Connection)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot marshal connection: %w", err)
|
return fmt.Errorf("cannot marshal connection: %w", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user