MCPcopy Create free account
hub / github.com/QuantumNous/new-api / ErrorWithStatusCode

Method ErrorWithStatusCode

relaykit/types/error.go:137–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135}
136
137func (e *NewAPIError) ErrorWithStatusCode() string {
138 if e == nil {
139 return ""
140 }
141 msg := e.Error()
142 if e.StatusCode == 0 {
143 return msg
144 }
145 if msg == "" {
146 return fmt.Sprintf("status_code=%d", e.StatusCode)
147 }
148 return fmt.Sprintf("status_code=%d, %s", e.StatusCode, msg)
149}
150
151// MaskSensitiveError masks the upstream addresses of the channel that produced
152// the error in the error text; see kitutil.MaskSensitiveInfo.

Callers

nothing calls this directly

Calls 1

ErrorMethod · 0.95

Tested by

no test coverage detected