This commit is contained in:
ryan
2026-07-13 15:17:45 +08:00
parent 08e61ce833
commit e0eb4e5975
334 changed files with 17212 additions and 12321 deletions
+1 -1
View File
@@ -42,4 +42,4 @@ func AbortTooManyRequests(c *gin.Context, msg string) {
// AbortConflict 以 409 中断请求并将错误挂载到 Gin Error 链。
func AbortConflict(c *gin.Context, msg string) {
AbortWithError(c, http.StatusConflict, msg)
}
}
+1 -1
View File
@@ -37,4 +37,4 @@ func ErrorHandlerMiddleware() gin.HandlerFunc {
c.JSON(http.StatusInternalServerError, Err("内部系统错误"))
}
}
}
+1 -1
View File
@@ -165,4 +165,4 @@ func TestErrorHandlerMiddleware_RecordsSpanOnAPIError(t *testing.T) {
assert.Equal(t, codes.Error, spans[0].Status().Code)
assert.Equal(t, "bad request", spans[0].Status().Description)
require.NotEmpty(t, spans[0].Events())
}
}