( error: unknown, )
| 116 | } |
| 117 | |
| 118 | export const getFreebuffRateLimitErrorMessage = ( |
| 119 | error: unknown, |
| 120 | ): string | null => { |
| 121 | const details = getCliApiErrorDetails(error) |
| 122 | if (details.statusCode !== 429) return null |
| 123 | if (details.errorCode === 'free_mode_rate_limited') { |
| 124 | return details.message ?? FREEBUFF_RATE_LIMIT_MESSAGE |
| 125 | } |
| 126 | return FREEBUFF_RATE_LIMIT_MESSAGE |
| 127 | } |
| 128 | |
| 129 | export const getCountryBlockFromFreeModeError = ( |
| 130 | error: unknown, |
no test coverage detected