[feat] 丰富错误内容提示
This commit is contained in:
@@ -147,7 +147,7 @@ func NewMsgResponse(msg string, code int) contracts.HttpResponse {
|
||||
}
|
||||
|
||||
func NewErrResponse(err *contracts.Err) contracts.HttpResponse {
|
||||
return NewJsonResponse([]byte(fmt.Sprintf(`{"code": %d, "msg": %q, "errord": %q}`, err.Code, err.Msg, err.Errord)))
|
||||
return NewJsonResponse([]byte(fmt.Sprintf(`{"code": %d, "msg": %q}`, err.Code, err.Error())))
|
||||
}
|
||||
|
||||
func HttpResponse(data any) contracts.HttpResponse {
|
||||
|
||||
Reference in New Issue
Block a user