error.go
298 字节
package service
import (
protocol "openapi/pkg/domain"
"openapi/pkg/infrastructure/aliyun"
)
//错误处理
func ErrorHandler(in error) (err error) {
switch in {
case aliyun.OssErrFileFormat:
err = protocol.NewCustomMessage(2, in.Error())
break
default:
err = in
return
}
return
}