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

Method MaskSensitiveError

types/error.go:148–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146}
147
148func (e *NewAPIError) MaskSensitiveError() string {
149 if e == nil {
150 return ""
151 }
152 if e.Err == nil {
153 return string(e.errorCode)
154 }
155 errStr := e.Err.Error()
156 if e.errorCode == ErrorCodeCountTokenFailed {
157 return errStr
158 }
159 return common.MaskSensitiveInfo(errStr)
160}
161
162func (e *NewAPIError) MaskSensitiveErrorWithStatusCode() string {
163 if e == nil {

Callers 1

Calls 2

MaskSensitiveInfoFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected