MCPcopy
hub / github.com/benbjohnson/litestream / writeJSONError

Function writeJSONError

server.go:352–359  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, message string, details interface{})

Source from the content-addressed store, hash-verified

350}
351
352func writeJSONError(w http.ResponseWriter, status int, message string, details interface{}) {
353 w.Header().Set("Content-Type", "application/json")
354 w.WriteHeader(status)
355 json.NewEncoder(w).Encode(ErrorResponse{
356 Error: message,
357 Details: details,
358 })
359}
360
361// StartRequest is the request body for the /start endpoint.
362type StartRequest struct {

Callers 7

handleStartMethod · 0.85
handleStopMethod · 0.85
handleTXIDMethod · 0.85
handleSyncStatusMethod · 0.85
handleSyncMethod · 0.85
handleRegisterMethod · 0.85
handleUnregisterMethod · 0.85

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected