Skip to content

Commit

Permalink
fix: error names
Browse files Browse the repository at this point in the history
  • Loading branch information
CahidArda committed Nov 7, 2024
1 parent 013a3ab commit e754a5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class QstashChatRatelimitError extends QstashError {

constructor(args: ChatRateLimit) {
super(`Exceeded chat rate limit. ${JSON.stringify(args)} `);
this.name = "QstashChatRatelimitError";
this.limitRequests = args["limit-requests"];
this.limitTokens = args["limit-tokens"];
this.remainingRequests = args["remaining-requests"];
Expand All @@ -51,10 +52,10 @@ export class QstashDailyRatelimitError extends QstashError {

constructor(args: RateLimit) {
super(`Exceeded daily rate limit. ${JSON.stringify(args)} `);
this.name = "QstashDailyRatelimitError";
this.limit = args.limit;
this.remaining = args.remaining;
this.reset = args.reset;
this.name = "QstashChatRatelimitError";
}
}

Expand Down

0 comments on commit e754a5f

Please sign in to comment.