MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / abortWithMidjourneyMessage

Function abortWithMidjourneyMessage

middleware/utils.go:21–29  ·  view source on GitHub ↗
(c *gin.Context, statusCode int, code int, description string)

Source from the content-addressed store, hash-verified

19}
20
21func abortWithMidjourneyMessage(c *gin.Context, statusCode int, code int, description string) {
22 c.JSON(statusCode, gin.H{
23 "description": description,
24 "type": "new_api_error",
25 "code": code,
26 })
27 c.Abort()
28 common.LogError(c.Request.Context(), description)
29}

Callers

nothing calls this directly

Calls 1

LogErrorFunction · 0.92

Tested by

no test coverage detected