()
| 132 | } |
| 133 | |
| 134 | func (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 | |
| 148 | func (e *NewAPIError) MaskSensitiveError() string { |
| 149 | if e == nil { |
no test coverage detected