This commit is contained in:
withchao
2023-01-12 10:42:27 +08:00
parent 94eeb3abb2
commit 59c477424c
2 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ func WriteErrorResponse(ctx context.Context, funcName string, err error, args ..
for _, s := range s.Details() {
details = append(details, fmt.Sprintf("%+v", s))
}
ctx.Value(TraceLogKey).(*ApiInfo).GinCtx.JSON(http.StatusOK, gin.H{"errCode": s.Code(), "errMsg": s.String(), "errDtl": strings.Join(details, "\n")})
ctx.Value(TraceLogKey).(*ApiInfo).GinCtx.JSON(http.StatusOK, gin.H{"errCode": s.Code(), "errMsg": s.Message(), "errDtl": strings.Join(details, "\n")})
return
}
}