MCPcopy Create free account
hub / github.com/imroc/req / Error

Method Error

internal/http3/error.go:21–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19var _ error = &Error{}
20
21func (e *Error) Error() string {
22 s := e.ErrorCode.string()
23 if s == "" {
24 s = fmt.Sprintf("H3 error (%#x)", uint64(e.ErrorCode))
25 }
26 // Usually errors are remote. Only make it explicit for local errors.
27 if !e.Remote {
28 s += " (local)"
29 }
30 if e.ErrorMessage != "" {
31 s += ": " + e.ErrorMessage
32 }
33 return s
34}
35
36func (e *Error) Is(target error) bool {
37 t, ok := target.(*Error)

Callers 3

TestDialFunction · 0.45
AssertErrorContainsFunction · 0.45

Calls 1

stringMethod · 0.45

Tested by 2

TestDialFunction · 0.36