Add ErrorHandler for log level selects
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -2,7 +2,6 @@ package exception
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
// 12 chars len
|
||||
@@ -60,7 +59,7 @@ func (self *Builder) Build() string {
|
||||
self.Original,
|
||||
)
|
||||
if self.Error != nil {
|
||||
slog.Warn("Service exception", "id", errorCode, "err", self.Error)
|
||||
ErrorHandler(self.Status, errorCode, self.Error)
|
||||
}
|
||||
return errorCode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user