We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9656fd5 commit 8c0714fCopy full SHA for 8c0714f
packages/idempotency/src/errors.ts
@@ -1,7 +1,15 @@
1
+import { IdempotencyRecord } from './persistence';
2
/**
3
* Item attempting to be inserted into persistence store already exists and is not expired
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
+}
13
14
15
* Item does not exist in persistence store
0 commit comments