MCPcopy
hub / github.com/cayleygraph/cayley / WriteError

Function WriteError

internal/http/query.go:40–44  ·  view source on GitHub ↗
(w io.Writer, err error)

Source from the content-addressed store, hash-verified

38}
39
40func WriteError(w io.Writer, err error) error {
41 enc := json.NewEncoder(w)
42 //enc.SetIndent("", " ")
43 return enc.Encode(ErrorQueryWrapper{err.Error()})
44}
45
46func WriteResult(w io.Writer, result interface{}) error {
47 enc := json.NewEncoder(w)

Callers 1

ServeV1ShapeMethod · 0.85

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected