dood-stream-client
Version:
🚀 A feature-rich client for the DoodStream API with caching, logging, and error handling
20 lines (19 loc) • 685 B
JavaScript
import { DoodStreamApiError } from "./api-error";
/**
* 🛑 Custom error class for rate limit errors
*/
export class DoodStreamRateLimitError extends DoodStreamApiError {
/**
* Create a new rate limit error
*
* @param message - Error message
* @param response - Original response data
* @param context - Additional context information
*/
constructor(message = "Rate limit exceeded", response, context) {
super(message, 429, response, context);
this.name = "DoodStreamRateLimitError";
// Ensure proper prototype chain for instanceof checks
Object.setPrototypeOf(this, DoodStreamRateLimitError.prototype);
}
}