Skip to content

Commit

Permalink
feat: remove unix timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoffelen committed Sep 7, 2024
1 parent e7ce488 commit 0dfcac3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/api/src/lib/errors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import slug from "slug";

const removeUniqueIds = (str) => {
return str.replace(/[a-f0-9]([a-f0-9-]{24,34})[a-f0-9]/g, "{id}");
// uuids
str = str.replace(/[a-f0-9]([a-f0-9-]{24,34})[a-f0-9]/g, "{id}");

// unix and epoch timestamps
str = str.replace(/[0-9]{13}/g, "{timestamp}");
str = str.replace(/[0-9]{10}/g, "{timestamp}");

return str;
};

export const getErrorKey = (error) => {
Expand Down

0 comments on commit 0dfcac3

Please sign in to comment.