mirror of
https://github.com/movie-web/extension.git
synced 2025-09-13 09:13:24 +00:00
Add more details to the error message
This commit is contained in:
@@ -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.`,
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user