Update main.go
Browse files
main.go
CHANGED
|
@@ -331,7 +331,7 @@ func forwardToSider(w http.ResponseWriter, r *http.Request) {
|
|
| 331 |
if resp.StatusCode != http.StatusOK {
|
| 332 |
fmt.Printf("导致%d错误的请求体: %s\n", resp.StatusCode, string(finalBody))
|
| 333 |
fmt.Printf("请求Headers: %+v\n", req.Header)
|
| 334 |
-
http.Error(w, fmt.Sprintf("Sider服务返回错误: %d", resp.StatusCode), resp.StatusCode)
|
| 335 |
return
|
| 336 |
}
|
| 337 |
|
|
|
|
| 331 |
if resp.StatusCode != http.StatusOK {
|
| 332 |
fmt.Printf("导致%d错误的请求体: %s\n", resp.StatusCode, string(finalBody))
|
| 333 |
fmt.Printf("请求Headers: %+v\n", req.Header)
|
| 334 |
+
http.Error(w, fmt.Sprintf("Sider服务返回错误: %d - %s", resp.StatusCode, string(bodyBytes)), resp.StatusCode)
|
| 335 |
return
|
| 336 |
}
|
| 337 |
|