fix(server): output detailed error message

Resolved #8.
This commit is contained in:
kallydev
2020-11-29 12:21:32 +08:00
parent 6cdc720ec4
commit 3089fbf1e6
4 changed files with 9 additions and 8 deletions

View File

@ -37,7 +37,7 @@ func NewService(configPath string) *Service {
func (svc *Service) loadRouter() {
instance := svc.instance
instance.HTTPErrorHandler = func(err error, ctx echo.Context) {
_ = NewResponse(ctx, UnknownError, err)
_ = NewResponse(ctx, err, nil)
}
instance.Static("/", "../website/build")
apiGroup := instance.Group("/api")