MCPcopy
hub / github.com/dgraph-io/dgraph / WriteErrorResponse

Function WriteErrorResponse

graphql/admin/http.go:118–120  ·  view source on GitHub ↗

WriteErrorResponse writes the error to the HTTP response writer in GraphQL format.

(w http.ResponseWriter, r *http.Request, err error)

Source from the content-addressed store, hash-verified

116
117// WriteErrorResponse writes the error to the HTTP response writer in GraphQL format.
118func WriteErrorResponse(w http.ResponseWriter, r *http.Request, err error) {
119 write(w, schema.ErrorResponse(err), strings.Contains(r.Header.Get("Accept-Encoding"), "gzip"))
120}
121
122type graphqlSubscription struct {
123 graphqlHandler *graphqlHandler

Callers 2

setupServerFunction · 0.92
ServeHTTPMethod · 0.85

Calls 3

ErrorResponseFunction · 0.92
writeFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected