Skip to content

Commit 8c0714f

Browse files
committed
Merge branch 'main' into tolutheo-dev
1 parent 9656fd5 commit 8c0714f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/idempotency/src/errors.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
import { IdempotencyRecord } from './persistence';
12
/**
23
* Item attempting to be inserted into persistence store already exists and is not expired
34
*/
4-
class IdempotencyItemAlreadyExistsError extends Error {}
5+
class IdempotencyItemAlreadyExistsError extends Error {
6+
public existingRecord: IdempotencyRecord;
7+
8+
public constructor(message: string, existingRecord: IdempotencyRecord) {
9+
super(message);
10+
this.existingRecord = existingRecord;
11+
}
12+
}
513

614
/**
715
* Item does not exist in persistence store

0 commit comments

Comments
 (0)