~emersion/gqlclient

gqlclient/error.go -rw-r--r-- 451 bytes
4e6e9c76Simon Ser Check response Content-Type 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package gqlclient

import (
	"encoding/json"
)

// ErrorLocation describes an error location in a GraphQL document.
//
// Line and column numbers start from 1.
type ErrorLocation struct {
	Line, Column int
}

// Error is a GraphQL error.
type Error struct {
	Message    string
	Locations  []ErrorLocation
	Path       []interface{}
	Extensions json.RawMessage
}

func (err *Error) Error() string {
	return "gqlclient: server failure: " + err.Message
}