MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / writeUserInboundError

Function writeUserInboundError

internal/serverapi/users.go:642–648  ·  view source on GitHub ↗
(w http.ResponseWriter, err error)

Source from the content-addressed store, hash-verified

640}
641
642func writeUserInboundError(w http.ResponseWriter, err error) {
643 status := http.StatusInternalServerError
644 if errors.Is(err, users.ErrUserInboundNotFound) {
645 status = http.StatusNotFound
646 }
647 writeJSON(w, status, map[string]any{"error": err.Error()})
648}
649
650var uuidRe = regexp.MustCompile(`^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`)
651

Callers 3

handleUserInboundMethod · 0.85
handleAccessApplyMethod · 0.85

Calls 2

writeJSONFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected