forked from getcursor/cursor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pricingBrowser' of https://github.com/getcursor/cursor …
…into pricingBrowser
- Loading branch information
Showing
4 changed files
with
257 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,45 +8,50 @@ export class ExpectedBackendError extends Error { | |
|
||
export class NoAuthRateLimitError extends ExpectedBackendError { | ||
constructor( | ||
message = 'You have reached the rate limit for unauthenticated requests. Please authenticate to continue.' | ||
message = 'You\'ve reached the rate limit for unauthenticated requests. Please log in to continue.', | ||
) { | ||
super(message) | ||
this.name = 'NoAuthRateLimitError' | ||
this.title = 'Please log in to continue...' | ||
} | ||
} | ||
|
||
export class AuthRateLimitError extends ExpectedBackendError { | ||
constructor( | ||
message = 'You have reached the rate limit for authenticated requests. Please wait before making more requests.' | ||
message = 'It seems like you\'re making an unusual number of AI requests. Please try again later. If you think this is a mistake, please contact [email protected]' | ||
) { | ||
super(message) | ||
this.name = 'AuthRateLimitError' | ||
this.title = 'You\'re going a bit fast...' | ||
} } | ||
|
||
export class NoAuthLocalRateLimitError extends ExpectedBackendError { | ||
constructor( | ||
message = 'You have reached the rate limit for unauthenticated local requests. Please authenticate to continue.' | ||
message = 'To protect our backend, we ask that free users limit their usage to 30 prompts per hour. To raise this limit, feel free to upgrade to pro.' | ||
) { | ||
super(message) | ||
this.name = 'NoAuthLocalRateLimitError' | ||
this.title = 'You\'re going a bit fast...' | ||
} | ||
} | ||
|
||
export class NoAuthGlobalOldRateLimitError extends ExpectedBackendError { | ||
constructor( | ||
message = 'You have reached the rate limit for unauthenticated global requests. Please wait before making more requests.' | ||
message = 'If you\'ve enjoyed using Cursor, please consider subscribing to one of our paid plans. Otherwise, you can enter your Open AI key (gear icon) to continue using the AI features at-cost.' | ||
) { | ||
super(message) | ||
this.name = 'NoAuthGlobalOldRateLimitError' | ||
this.title = 'Free tier limit exceeded' | ||
} | ||
} | ||
|
||
export class NoAuthGlobalNewRateLimitError extends ExpectedBackendError { | ||
constructor( | ||
message = 'You have reached the rate limit for unauthenticated global requests. Please wait before making more requests.' | ||
message = 'We\'re currently experiencing a high volume of requests. Please try again in a few minutes. For support, please contact [email protected].' | ||
) { | ||
super(message) | ||
this.name = 'NoAuthGlobalNewRateLimitError' | ||
this.title = 'Our servers are overloaded...' | ||
} | ||
} | ||
|
||
|