UNPKG

rate-limiter-flexible

Version:

Node.js atomic and non-atomic counters, rate limiting tools, protection from DoS and brute-force attacks at scale

14 lines (13 loc) 317 B
module.exports = class RateLimiterQueueError extends Error { constructor(message, extra) { super(); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } this.name = 'CustomError'; this.message = message; if (extra) { this.extra = extra; } } };