MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / writeError

Function writeError

internal/sidecar/server.go:482–486  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, message string)

Source from the content-addressed store, hash-verified

480}
481
482func writeError(w http.ResponseWriter, status int, message string) {
483 w.Header().Set("Content-Type", "application/json")
484 w.WriteHeader(status)
485 _ = json.NewEncoder(w).Encode(map[string]any{"error": message})
486}
487
488func methodNotAllowed(w http.ResponseWriter) {
489 writeError(w, http.StatusMethodNotAllowed, "method not allowed")

Callers 15

withMiddlewareMethod · 0.85
handleProvidersMethod · 0.85
handleProviderMethod · 0.85
handleProviderActionMethod · 0.85
handleMCPInstallMethod · 0.85
handleMCPUninstallMethod · 0.85
handleEntityUninstallMethod · 0.85
handleLaunchDryRunMethod · 0.85
handleLaunchApplyMethod · 0.85
writeResultFunction · 0.85
methodNotAllowedFunction · 0.85
handleInstructionsMethod · 0.85

Calls 2

SetMethod · 0.65
HeaderMethod · 0.65

Tested by

no test coverage detected