diff options
author | Nullptrderef <nullptrderef@proton.me> | 2024-04-21 11:32:55 +0200 |
---|---|---|
committer | Nullptrderef <nullptrderef@proton.me> | 2024-04-21 11:32:55 +0200 |
commit | 59d6c9a75ad0e5a485258d929031bd803c79f157 (patch) | |
tree | 7d7447b0f6aa7d534439ee8776b5c037990f7cd5 /packages/anastasis-core | |
parent | 6fa28f879780ad42e54a8a55e408ba7fff9cfb04 (diff) | |
download | wallet-core-59d6c9a75ad0e5a485258d929031bd803c79f157.tar.xz |
add a fixm
Diffstat (limited to 'packages/anastasis-core')
-rw-r--r-- | packages/anastasis-core/src/index.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/anastasis-core/src/index.ts b/packages/anastasis-core/src/index.ts index 15e06cb85..05fa4a49f 100644 --- a/packages/anastasis-core/src/index.ts +++ b/packages/anastasis-core/src/index.ts @@ -279,19 +279,22 @@ async function getProviderInfo( providerBaseUrl: string, ): Promise<AuthenticationProviderStatus> { // FIXME: Use a reasonable timeout here. - console.log("hi"); - let resp: Response; try { resp = await fetch(new URL("config", providerBaseUrl).href); } catch (e) { + console.warn( + "Encountered an HTTP error whilst trying to get the provider's config: ", + e, + ); return { status: "error", code: TalerErrorCode.ANASTASIS_REDUCER_NETWORK_FAILED, hint: "request to anastasis provider failed", }; } - if (resp.status >= 400) { + if (!resp.ok) { + console.warn("Got bad response code whilst getting provider config", resp); return { status: "error", code: TalerErrorCode.ANASTASIS_REDUCER_NETWORK_FAILED, |