@afriex/core
Version:
HTTP client, configuration and typed errors for the Afriex Business API SDK
14 lines • 407 B
JavaScript
import { ApiError } from "./ApiError.js";
export class RateLimitError extends ApiError {
constructor(response, retryAfter) {
super(response, 429);
this.retryAfter = retryAfter ? parseInt(retryAfter, 10) : undefined;
}
toJSON() {
return {
...super.toJSON(),
retryAfter: this.retryAfter,
};
}
}
//# sourceMappingURL=RateLimitError.js.map