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

Function newResponseError

aibridge/intercept/messages/base.go:652–664  ·  view source on GitHub ↗
(msg, errType string, status int, retryAfter time.Duration)

Source from the content-addressed store, hash-verified

650}
651
652func newResponseError(msg, errType string, status int, retryAfter time.Duration) *ResponseError {
653 return &ResponseError{
654 ErrorResponse: &shared.ErrorResponse{
655 Error: shared.ErrorObjectUnion{
656 Message: msg,
657 Type: errType,
658 },
659 Type: constant.ValueOf[constant.Error](),
660 },
661 StatusCode: status,
662 RetryAfter: retryAfter,
663 }
664}
665
666func (e *ResponseError) Error() string {
667 if e.ErrorResponse == nil {

Callers 4

mapStreamErrorMethod · 0.70
TestWriteUpstreamErrorFunction · 0.70
ResponseErrorFromKeyPoolFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestWriteUpstreamErrorFunction · 0.56