Use eris for error management

This commit is contained in:
Jamie Curnow committed 2023-02-24 17:19:07 +10:00
1 parent 80315bd50e
commit c288886fd4
44 files changed
+173 -128

No files matched your search

+3 -2
View File
@@ -3,7 +3,8 @@ package types
import (
"database/sql/driver"
"encoding/json"
"fmt"
"github.com/rotisserie/eris"
)
// JSONB can be anything
@@ -28,7 +29,7 @@ func (j *JSONB) Scan(src interface{}) error {
case []uint8:
srcString = string(src.([]uint8))
default:
return fmt.Errorf("Incompatible type for JSONB: %v", v)
return eris.Errorf("Incompatible type for JSONB: %v", v)
}
jsonb.Encoded = srcString