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

Method MaskSensitiveErrorWithStatusCode

relaykit/types/error.go:167–179  ·  view source on GitHub ↗
(upstreamURLs ...string)

Source from the content-addressed store, hash-verified

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

Callers 2

ProcessChannelErrorFunction · 0.80
RecordRelayErrorLogFunction · 0.80

Calls 1

MaskSensitiveErrorMethod · 0.95

Tested by

no test coverage detected