MCPcopy
hub / github.com/Infisical/agent-vault / jsonError

Function jsonError

internal/server/respond.go:30–34  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, message string)

Source from the content-addressed store, hash-verified

28}
29
30func jsonError(w http.ResponseWriter, status int, message string) {
31 w.Header().Set("Content-Type", "application/json")
32 w.WriteHeader(status)
33 _ = json.NewEncoder(w).Encode(map[string]string{"error": message})
34}
35
36// jsonCodedError writes a JSON error with both a machine-readable code and
37// a human-readable message.

Callers 15

handleVaultLogsListMethod · 0.85
requireActorMethod · 0.85
requireOwnerActorMethod · 0.85
requireInstanceMemberMethod · 0.85
guardLastOwnerMethod · 0.85
requireVaultAccessMethod · 0.85
requireVaultAdminMethod · 0.85
requireVaultMemberMethod · 0.85
requireProposalReviewMethod · 0.85
requireAuthMethod · 0.85
handleAgentCreateMethod · 0.85

Calls 1

SetMethod · 0.80

Tested by

no test coverage detected