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 68fc758 commit e4968bfCopy full SHA for e4968bf
packages/idempotency/src/errors.ts
@@ -1,7 +1,18 @@
1
+import { AttributeValue } from '@aws-sdk/client-dynamodb';
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: Record<string, AttributeValue> | undefined;
7
+
8
+ public constructor(
9
+ message: string,
10
+ existingRecord: Record<string, AttributeValue> | undefined
11
+ ) {
12
+ super(message);
13
+ this.existingRecord = existingRecord;
14
+ }
15
+}
16
17
18
* Item does not exist in persistence store
0 commit comments