UNPKG

@node-idempotency/core

Version:

A Race-Condition free Node.js library that ensures idempotency for requests, preventing unintended duplicate operations.

19 lines 886 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdempotencyError = exports.IdempotencyErrorCodes = void 0; var IdempotencyErrorCodes; (function (IdempotencyErrorCodes) { IdempotencyErrorCodes["IDEMPOTENCY_KEY_LEN_EXEEDED"] = "IDEMPOTENCY_KEY_LEN_EXEEDED"; IdempotencyErrorCodes["IDEMPOTENCY_KEY_MISSING"] = "IDEMPOTENCY_KEY_MISSING"; IdempotencyErrorCodes["IDEMPOTENCY_FINGERPRINT_MISSMATCH"] = "IDEMPOTENCY_FINGERPRINT_MISSMATCH"; IdempotencyErrorCodes["REQUEST_IN_PROGRESS"] = "REQUEST_IN_PROGRESS"; })(IdempotencyErrorCodes || (exports.IdempotencyErrorCodes = IdempotencyErrorCodes = {})); class IdempotencyError extends Error { constructor(message, code, meta) { super(message); this.code = code; this.meta = meta; } } exports.IdempotencyError = IdempotencyError; //# sourceMappingURL=error.js.map