Skip to content

Commit

Permalink
fix(opapi): fix error ID timestamp regex
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrahamLopez10 committed Dec 6, 2023
1 parent c937776 commit c43d652
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bpinternal/opapi",
"version": "0.6.0",
"version": "0.6.1",
"description": "",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion opapi/src/generators/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ abstract class BaseApiError<Code extends ErrorCode, Type extends string, Descrip
static generateId() {
const prefix = this.getPrefix();
const timestamp = new Date().toISOString().replace(/[\:\-TZ]/g, "").split(".")[0] // UTC time in YYMMDDHHMMSS format
const timestamp = new Date().toISOString().replace(/[\\-:TZ]/g, "").split(".")[0] // UTC time in YYMMDDHHMMSS format
const randomSuffixByteLength = 4
const randomHexSuffix = Array.from(cryptoLib.getRandomValues(new Uint8Array(randomSuffixByteLength)))
Expand Down

0 comments on commit c43d652

Please sign in to comment.