From 1f6068db69f535d77764d326dbab26e4e53686ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20P=C3=A9czeli?= <7523167+balazspeczeli@users.noreply.github.com> Date: Tue, 14 Feb 2023 16:24:02 +0100 Subject: [PATCH] Improve error message (#1349) * Improve error message * Update src/analytics.js * Fix linting --------- Co-authored-by: Daniel Barnes --- src/analytics.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/analytics.js b/src/analytics.js index 84d2ebe66..6fd3a3711 100644 --- a/src/analytics.js +++ b/src/analytics.js @@ -37,7 +37,8 @@ const { const ID_DO_NOT_TRACK = 'do-not-track'; const deterministic = async (data) => { - if (!data) throw new Error('data is not set calculating deterministic uuid'); + if (!data) + throw new Error("data is not set, can't calculate a deterministic uuid"); const namespace = uuidv5('iterative.ai', uuidv5.DNS); const name = await promisify(scrypt)(data, parse(namespace), 8, {