MCPcopy Create free account
hub / github.com/gotify/server / writeError

Function writeError

error/handler.go:58–64  ·  view source on GitHub ↗
(ctx *gin.Context, errString string)

Source from the content-addressed store, hash-verified

56}
57
58func writeError(ctx *gin.Context, errString string) {
59 status := http.StatusBadRequest
60 if ctx.Writer.Status() != http.StatusOK {
61 status = ctx.Writer.Status()
62 }
63 ctx.JSON(status, &model.Error{Error: http.StatusText(status), ErrorCode: status, ErrorDescription: errString})
64}

Callers 1

HandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…