- mtps与dada.IsErrShopNotExist
This commit is contained in:
@@ -177,3 +177,12 @@ func (a *API) GetCancelReasons() (retVal []CancelReason, err error) {
|
||||
}
|
||||
return retVal, nil
|
||||
}
|
||||
|
||||
func IsErrShopNotExist(err error) bool {
|
||||
if err != nil {
|
||||
if errExt, ok := err.(*utils.ErrorWithCode); ok && errExt.IntCode() == ResponseCodeShopNotExist {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user