Remove any in error handling

This commit is contained in:
William Oldham
2024-03-15 19:42:51 +00:00
parent 327f175241
commit 8e179e4455
4 changed files with 8 additions and 8 deletions

View File

@@ -23,10 +23,10 @@ const handler: PlasmoMessaging.MessageHandler<BaseRequest, Response> = async (re
allowed: await isDomainWhitelisted(req.sender.tab.url),
hasPermission: await hasPermission(),
});
} catch (err: any) {
} catch (err) {
res.send({
success: false,
error: err instanceof Error ? err.message : err,
error: err instanceof Error ? err.message : String(err),
});
}
};