- delivery.IsErrShopExist
This commit is contained in:
@@ -186,3 +186,12 @@ func IsErrShopNotExist(err error) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func IsErrShopExist(err error) bool {
|
||||
if err != nil {
|
||||
if errExt, ok := err.(*utils.ErrorWithCode); ok && errExt.IntCode() == ResponseCodeShopAlreadyExist {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user