Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error names #214

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: error names
CahidArda committed Nov 7, 2024
commit e754a5f3d8f82a83b87a6362e0621f546b146add
3 changes: 2 additions & 1 deletion src/client/error.ts
Original file line number Diff line number Diff line change
@@ -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"];
@@ -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";
}
}