MCPcopy Create free account
hub / github.com/kataras/iris / GetError

Function GetError

x/client/error.go:51–62  ·  view source on GitHub ↗

GetError reports whether the given "err" is an APIError.

(err error)

Source from the content-addressed store, hash-verified

49
50// GetError reports whether the given "err" is an APIError.
51func GetError(err error) (APIError, bool) {
52 if err == nil {
53 return APIError{}, false
54 }
55
56 apiErr, ok := err.(APIError)
57 if !ok {
58 return APIError{}, false
59 }
60
61 return apiErr, true
62}
63
64// DecodeError binds a json error to the "destPtr".
65func DecodeError(err error, destPtr interface{}) error {

Callers 4

HandleErrorFunction · 0.92
HandleAPIErrorFunction · 0.92
DecodeErrorFunction · 0.85
GetErrorCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…