From 3763ee9c65869d664bdf55ef06c9b503984d085f Mon Sep 17 00:00:00 2001 From: gllm-dev Date: Thu, 16 May 2024 17:16:31 +0200 Subject: [PATCH] fix: throw --- package.json | 2 +- src/clients/iframe-client.ts | 3 ++- src/version.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c10d8fe..4a567b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openfort/openfort-js", - "version": "0.6.16", + "version": "0.6.17", "description": "", "author": "Openfort", "repository": { diff --git a/src/clients/iframe-client.ts b/src/clients/iframe-client.ts index 8ebb458..bf2753e 100644 --- a/src/clients/iframe-client.ts +++ b/src/clients/iframe-client.ts @@ -135,7 +135,7 @@ export class IframeClient { resolve(response as T); } else if (response instanceof ErrorResponse) { if (response.error === NOT_CONFIGURED_ERROR) { - throw new NotConfiguredError(); + reject(new NotConfiguredError()); } reject(new UnknownResponseError(response.error)); } else { @@ -192,6 +192,7 @@ export class IframeClient { response = await this.waitForResponse(uuid); } catch (e) { if (e instanceof NotConfiguredError) { + console.log("Not configured, reconfiguring..."); await this.configure(); return this.sign(message, requireArrayify, requireHash); } diff --git a/src/version.ts b/src/version.ts index 7a59d7f..86a91c9 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ -export const VERSION = "0.6.16"; +export const VERSION = "0.6.17"; export const PACKAGE = "@openfort/openfort-js";