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.
IdempotencyUnknownError
1 parent 9d007df commit 39167e7Copy full SHA for 39167e7
packages/idempotency/src/persistence/RedisPersistenceLayer.ts
@@ -6,6 +6,7 @@ import {
6
IdempotencyItemNotFoundError,
7
IdempotencyPersistenceConnectionError,
8
IdempotencyPersistenceConsistencyError,
9
+ IdempotencyUnknownError,
10
} from '../errors.js';
11
import type { IdempotencyRecordStatusValue } from '../types/IdempotencyRecord.js';
12
import type {
@@ -130,7 +131,7 @@ class RedisPersistenceLayer extends BasePersistenceLayer {
130
131
if (record.getStatus() === IdempotencyRecordStatus.INPROGRESS) {
132
await this.#putInProgressRecord(record);
133
} else {
- throw new Error(
134
+ throw new IdempotencyUnknownError(
135
'Only INPROGRESS records can be inserted with _putRecord'
136
);
137
}
0 commit comments