MCPcopy
hub / github.com/PatchMon/PatchMon / Error

Function Error

server-source-code/internal/handler/response.go:18–20  ·  view source on GitHub ↗

Error writes a JSON error response.

(w http.ResponseWriter, status int, message string)

Source from the content-addressed store, hash-verified

16
17// Error writes a JSON error response.
18func Error(w http.ResponseWriter, status int, message string) {
19 JSON(w, status, map[string]string{"error": message})
20}

Callers 15

ListMethod · 0.85
GetByHostMethod · 0.85
GetByIDMethod · 0.85
UpdateMethod · 0.85
ToggleHostRepositoryMethod · 0.85
GetStatsMethod · 0.85
DeleteMethod · 0.85
CleanupOrphanedMethod · 0.85
GetAllMethod · 0.85
GetByTypeMethod · 0.85
UpdateMethod · 0.85
BulkUpdateMethod · 0.85

Calls 1

JSONFunction · 0.70

Tested by

no test coverage detected