commit 59d6c9a75ad0e5a485258d929031bd803c79f157
parent 6fa28f879780ad42e54a8a55e408ba7fff9cfb04
Author: Nullptrderef <nullptrderef@proton.me>
Date: Sun, 21 Apr 2024 11:32:55 +0200
add a fixm
Diffstat:
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git 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,
diff --git 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.
<p>
+ {/* TODO: make this actually work reliably cross-browser lol (opens about:blank for me) */}
<a onClick={saveAsPDF}>Save the personal information as PDF</a>
</p>
</ConfirmModal>