MCPcopy Index your code
hub / github.com/coder/coder / NewTestError

Function NewTestError

codersdk/client.go:541–547  ·  view source on GitHub ↗

NewTestError is a helper function to create a Error, setting the internal fields. It's generally only useful for testing.

(statusCode int, method string, u string)

Source from the content-addressed store, hash-verified

539// NewTestError is a helper function to create a Error, setting the internal fields. It's generally only useful for
540// testing.
541func NewTestError(statusCode int, method string, u string) *Error {
542 return &Error{
543 statusCode: statusCode,
544 method: method,
545 url: u,
546 }
547}
548
549// NewError creates a new Error with the response and status code.
550func NewError(statusCode int, response Response) *Error {

Callers 2

TestIsRetryableErrorFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestIsRetryableErrorFunction · 0.74