MCPcopy Index your code
hub / github.com/QuantumNous/new-api / MaskSensitiveErrorWithStatusCode

Method MaskSensitiveErrorWithStatusCode

types/error.go:162–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160}
161
162func (e *NewAPIError) MaskSensitiveErrorWithStatusCode() string {
163 if e == nil {
164 return ""
165 }
166 msg := e.MaskSensitiveError()
167 if e.StatusCode == 0 {
168 return msg
169 }
170 if msg == "" {
171 return fmt.Sprintf("status_code=%d", e.StatusCode)
172 }
173 return fmt.Sprintf("status_code=%d, %s", e.StatusCode, msg)
174}
175
176func (e *NewAPIError) SetMessage(message string) {
177 e.Err = errors.New(message)

Callers 1

processChannelErrorFunction · 0.80

Calls 1

MaskSensitiveErrorMethod · 0.95

Tested by

no test coverage detected