(response)
| 67 | } |
| 68 | |
| 69 | async function getResponseErrorText(response) { |
| 70 | const text = await response.text().catch(() => ''); |
| 71 | if (!text) { |
| 72 | return response.statusText || `HTTP ${response.status}`; |
| 73 | } |
| 74 | try { |
| 75 | const parsed = JSON.parse(text); |
| 76 | return parsed.error_description || parsed.error?.message || parsed.error || parsed.message || text; |
| 77 | } catch { |
| 78 | return text; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | async function exchangeRefreshToken(clientId, refreshToken, options = {}) { |
| 83 | const fetchImpl = getFetchImpl(options.fetchImpl); |
no outgoing calls
no test coverage detected