Audit changes
This commit is contained in:
@@ -27,6 +27,8 @@ func DB(err error) error {
|
||||
switch se.ExtendedCode {
|
||||
case sqlite3.ErrConstraintUnique, sqlite3.ErrConstraintPrimaryKey:
|
||||
return ErrAlreadyExists
|
||||
case sqlite3.ErrConstraintForeignKey, sqlite3.ErrConstraintCheck:
|
||||
return ErrConstraint
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ var (
|
||||
ErrInvalidNetName = BadRequest.WithMsg("Invalid network name.")
|
||||
ErrNetNameNotLocal = BadRequest.WithMsg("Network name must end with .local.")
|
||||
ErrInvalidPeerName = BadRequest.WithMsg("Invalid peer name.")
|
||||
ErrConstraint = BadRequest.WithMsg("Constraint error.")
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user