Merge branch 'develop' into feat-v1.1

This commit is contained in:
geeknonerd
2023-03-04 16:54:57 +08:00

View File

@@ -155,7 +155,11 @@ func IsFailWithResp(c *gin.Context, err error) bool {
switch v := err.(type) {
// 自定义类型
case RespType:
Fail(c, v)
data := v.Data()
if data == nil {
data = []string{}
}
FailWithData(c, v, data)
// 其他类型
default:
Fail(c, SystemError)