mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 23:16:37 +08:00
prettier
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ func ErrorHandlerMiddleware() gin.HandlerFunc {
|
||||
|
||||
c.JSON(http.StatusInternalServerError, Err("内部系统错误"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user