MCPcopy
hub / github.com/QuantumNous/new-api / ErrorWithStatusCode

Method ErrorWithStatusCode

types/error.go:134–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132}
133
134func (e *NewAPIError) ErrorWithStatusCode() string {
135 if e == nil {
136 return ""
137 }
138 msg := e.Error()
139 if e.StatusCode == 0 {
140 return msg
141 }
142 if msg == "" {
143 return fmt.Sprintf("status_code=%d", e.StatusCode)
144 }
145 return fmt.Sprintf("status_code=%d, %s", e.StatusCode, msg)
146}
147
148func (e *NewAPIError) MaskSensitiveError() string {
149 if e == nil {

Callers 1

processChannelErrorFunction · 0.80

Calls 1

ErrorMethod · 0.95

Tested by

no test coverage detected