Error code standardization

This commit is contained in:
skiffer-git
2023-01-04 11:06:28 +08:00
parent 89a4fe96b5
commit 1d5e4a0f8a
3 changed files with 52 additions and 13 deletions
+3
View File
@@ -71,6 +71,9 @@ func ToAPIErrWithErr(err error) ErrInfo {
if errors.Is(errInfo, ErrArgs) {
return ErrArgs
}
if errors.Is(errInfo, ErrDatabase) {
return ErrDatabase
}
}
return ErrDefaultOther