()
| 146 | } |
| 147 | |
| 148 | func (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 | |
| 162 | func (e *NewAPIError) MaskSensitiveErrorWithStatusCode() string { |
| 163 | if e == nil { |
no test coverage detected