MCPcopy Create free account
hub / github.com/Xe/x / Error

Struct Error

web/error.go:36–41  ·  view source on GitHub ↗

Error is a web response error. Use this when API calls don't work out like you wanted them to.

Source from the content-addressed store, hash-verified

34
35// Error is a web response error. Use this when API calls don't work out like you wanted them to.
36type Error struct {
37 WantStatus, GotStatus int
38 URL *url.URL
39 Method string
40 ResponseBody string
41}
42
43func (e Error) Error() string {
44 return fmt.Sprintf("%s %s: wanted status code %d, got: %d: %v", e.Method, e.URL, e.WantStatus, e.GotStatus, e.ResponseBody)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected