Fix: upload was marked canceled when small file uploaded

This commit is contained in:
HFO4
2019-11-27 12:49:31 +08:00
parent 4156a71adf
commit 29def02489
8 changed files with 71 additions and 21 deletions

View File

@ -26,6 +26,12 @@ func NewError(code int, msg string, err error) AppError {
}
}
// WithError 将应用error携带标准库中的error
func (err *AppError) WithError(raw error) AppError {
err.RawError = raw
return *err
}
// Error 返回业务代码确定的可读错误信息
func (err AppError) Error() string {
return err.Msg