mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-02 20:14:02 +08:00
Fix: upload was marked canceled when small file uploaded
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user