MCPcopy Create free account
hub / github.com/andersonmarquesgit/chargeback / ErrorJSON

Function ErrorJSON

chargeback-api/internal/presentation/response.go:32–39  ·  view source on GitHub ↗
(w http.ResponseWriter, err error, status int)

Source from the content-addressed store, hash-verified

30}
31
32func ErrorJSON(w http.ResponseWriter, err error, status int) {
33 payload := JSONResponse{
34 Error: true,
35 Message: err.Error(),
36 }
37
38 WriteJSON(w, status, payload)
39}

Callers

nothing calls this directly

Calls 1

WriteJSONFunction · 0.85

Tested by

no test coverage detected