MCPcopy Create free account
hub / github.com/compozy/agh / errorMiddleware

Function errorMiddleware

internal/api/httpapi/middleware.go:244–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

242}
243
244func errorMiddleware() gin.HandlerFunc {
245 return func(c *gin.Context) {
246 c.Next()
247 if len(c.Errors) == 0 || c.Writer.Written() {
248 return
249 }
250 core.RespondError(c, http.StatusInternalServerError, c.Errors.Last(), true)
251 }
252}
253
254func requestBodyLimitMiddleware(maxBytes int64) gin.HandlerFunc {
255 return func(c *gin.Context) {

Callers 2

newTestRouterFunction · 0.85
ensureEngineMethod · 0.85

Calls 1

RespondErrorFunction · 0.92

Tested by 1

newTestRouterFunction · 0.68