We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8743d3e commit fea8f8dCopy full SHA for fea8f8d
http/response/send.go
@@ -26,13 +26,8 @@ func Failed(w http.ResponseWriter, err error) {
26
errCode = exception.UnKnownException
27
}
28
29
- // 映射http status code 1xx - 5xx
30
- // 如果为其他errCode, 统一成200
31
- if errCode/100 >= 1 && errCode/100 <= 5 {
32
- httpCode = errCode
33
- } else {
34
- httpCode = http.StatusOK
35
- }
+ // 统一使用业务code, http code固定200
+ httpCode = http.StatusOK
36
37
resp := Data{
38
Code: &errCode,
0 commit comments