Skip to content

Commit

Permalink
Improve error message (#1349)
Browse files Browse the repository at this point in the history
* Improve error message

* Update src/analytics.js

* Fix linting

---------

Co-authored-by: Daniel Barnes <[email protected]>
  • Loading branch information
balazspeczeli and dacbd authored Feb 14, 2023
1 parent 7ac60ee commit 1f6068d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit 1f6068d

Please sign in to comment.