MCPcopy Create free account
hub / github.com/golang/appengine / Error

Method Error

internal/internal.go:49–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49func (e *APIError) Error() string {
50 if e.Code == 0 {
51 if e.Detail == "" {
52 return "APIError <empty>"
53 }
54 return e.Detail
55 }
56 s := fmt.Sprintf("API error %d", e.Code)
57 if m, ok := errorCodeMaps[e.Service]; ok {
58 s += " (" + e.Service + ": " + m[e.Code] + ")"
59 } else {
60 // Shouldn't happen, but provide a bit more detail if it does.
61 s = e.Service + " " + s
62 }
63 if e.Detail != "" {
64 s += ": " + e.Detail
65 }
66 return s
67}
68
69func (e *APIError) IsTimeout() bool {
70 return timeoutCodes[timeoutCodeKey{e.Service, e.Code}]

Callers 2

ServeHTTPMethod · 0.45
TestAPICallDialFailureFunction · 0.45

Calls

no outgoing calls

Tested by 2

ServeHTTPMethod · 0.36
TestAPICallDialFailureFunction · 0.36