优化提取错误提示消息

This commit is contained in:
2025-12-01 10:05:55 +08:00
parent 93dfbc92fa
commit c0b3490d00
3 changed files with 9 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
package core
import (
"fmt"
"log/slog"
"platform/pkg/env"
"runtime"
@@ -17,7 +18,8 @@ type Err struct {
func (e *Err) Error() string {
if e.err != nil {
return e.msg + ": " + e.err.Error()
slog.Debug(fmt.Sprintf("%s: %s", e.msg, e.err.Error()))
return e.msg
}
return e.msg
}