mirror of
https://github.com/gin-gonic/gin.git
synced 2026-09-05 07:02:15 +08:00
Add first-class support for RFC 9457 "Problem Details for HTTP APIs" error responses in JSON format: - gin.Problem type with the standard members (type, title, status, detail, instance) and extension members serialized at the top level - render.ProblemJSON renderer setting Content-Type to "application/problem+json; charset=utf-8" - Context.ProblemJSON and Context.AbortWithProblemJSON helpers; when given a gin.Problem, a zero Status defaults to the response code and an empty Title defaults to http.StatusText Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>