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

Function writeError

internal/server/http/api.go:180–184  ·  view source on GitHub ↗
(w http.ResponseWriter, msg string, code int)

Source from the content-addressed store, hash-verified

178}
179
180func writeError(w http.ResponseWriter, msg string, code int) {
181 w.Header().Set("Content-Type", "application/json")
182 w.WriteHeader(code)
183 json.NewEncoder(w).Encode(map[string]any{"message": msg, "code": code})
184}

Callers 2

RegisterAPIFunction · 0.85
listAttachmentsFunction · 0.85

Calls 1

WriteHeaderMethod · 0.80

Tested by

no test coverage detected