From cade0b50ab61fc31504101c31e02fbf098aedfa3 Mon Sep 17 00:00:00 2001 From: Jorrin <43169049+JorrinKievit@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:59:38 +0100 Subject: [PATCH] Add more details to the error message --- src/utils/storage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/storage.ts b/src/utils/storage.ts index 2237042..738df55 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -31,8 +31,9 @@ export const isDomainWhitelisted = async (url: string | undefined) => { export const assertDomainWhitelist = async (url: string) => { const isWhiteListed = await isDomainWhitelisted(url); + const currentDomain = makeUrlIntoDomain(url); if (!isWhiteListed) throw new Error( - 'Domain is not whitelisted. Open the extension and click on the power button to whitelist the domain.', + `${currentDomain} is not whitelisted. Open the extension and click on the power button to whitelist the site.`, ); };