(context)
| 24 | code: otp(), |
| 25 | fetchOptions: { |
| 26 | onError(context) { |
| 27 | if (context.error.status === 429) { |
| 28 | const retryAfter = context.response.headers.get("X-Retry-After"); |
| 29 | alert( |
| 30 | `Too many requests. Please try again after ${retryAfter} seconds`, |
| 31 | ); |
| 32 | } else { |
| 33 | alert( |
| 34 | context.error.message || |
| 35 | context.error.statusText || |
| 36 | context.error.status, |
| 37 | ); |
| 38 | } |
| 39 | }, |
| 40 | }, |
| 41 | }); |
| 42 | } |
nothing calls this directly
no outgoing calls
no test coverage detected