[#47] fixed some doc and code inconsistencies and removed some redundant parentheses

This commit is contained in:
Valley
2022-07-10 14:13:44 +08:00
committed by GitHub
parent d64fbf9011
commit 460c684caa
9 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -38,13 +38,13 @@ func InitApi(app core.App) (*echo.Echo, error) {
var apiErr *rest.ApiError
switch v := err.(type) {
case (*echo.HTTPError):
case *echo.HTTPError:
if v.Internal != nil && app.IsDebug() {
log.Println(v.Internal)
}
msg := fmt.Sprintf("%v", v.Message)
apiErr = rest.NewApiError(v.Code, msg, v)
case (*rest.ApiError):
case *rest.ApiError:
if app.IsDebug() && v.RawData() != nil {
log.Println(v.RawData())
}