From 59d6c9a75ad0e5a485258d929031bd803c79f157 Mon Sep 17 00:00:00 2001 From: Nullptrderef Date: Sun, 21 Apr 2024 11:32:55 +0200 Subject: add a fixm --- packages/anastasis-core/src/index.ts | 9 ++++++--- packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'packages') 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 { // 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, diff --git a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx index 228186a2d..e38b91b12 100644 --- a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx @@ -132,6 +132,7 @@ export function AttributeEntryScreen(): VNode { secret will be safely stored. If you forget what you have entered or if there is a misspell you will be unable to recover your secret.

+ {/* TODO: make this actually work reliably cross-browser lol (opens about:blank for me) */} Save the personal information as PDF

-- cgit v1.2.3