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

Function writeHostError

internal/serverapi/inbounds.go:295–301  ·  view source on GitHub ↗
(w http.ResponseWriter, err error)

Source from the content-addressed store, hash-verified

293}
294
295func writeHostError(w http.ResponseWriter, err error) {
296 status := http.StatusInternalServerError
297 if errors.Is(err, inbounds.ErrHostNotFound) {
298 status = http.StatusNotFound
299 }
300 writeJSON(w, status, map[string]any{"error": err.Error()})
301}
302
303// handleInboundUsers manages user assignments for an inbound.
304// GET → list user IDs assigned to this inbound

Callers 1

handleHostRoutesMethod · 0.85

Calls 2

writeJSONFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected