Skip to content

Commit 3e5a6ae

Browse files
committed
Update freebuff error when not available in your country. Update website/readme
1 parent 96349c3 commit 3e5a6ae

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

cli/src/utils/__tests__/error-handling.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,8 @@ describe('error-handling', () => {
103103
})
104104

105105
describe('FREE_MODE_UNAVAILABLE_MESSAGE', () => {
106-
test('mentions free mode', () => {
107-
expect(FREE_MODE_UNAVAILABLE_MESSAGE.toLowerCase()).toContain('free mode')
108-
})
109-
110-
test('mentions paid plan', () => {
111-
expect(FREE_MODE_UNAVAILABLE_MESSAGE.toLowerCase()).toContain('paid plan')
106+
test('mentions unavailability in country', () => {
107+
expect(FREE_MODE_UNAVAILABLE_MESSAGE.toLowerCase()).toContain('not available in your country')
112108
})
113109
})
114110

cli/src/utils/error-handling.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { env } from '@codebuff/common/env'
22

33
import type { ChatMessage } from '../types/chat'
44

5+
import { IS_FREEBUFF } from './constants'
6+
57
const defaultAppUrl = env.NEXT_PUBLIC_CODEBUFF_APP_URL || 'https://codebuff.com'
68

79
// Normalize unknown errors to a user-facing string.
@@ -57,8 +59,9 @@ export const isFreeModeUnavailableError = (error: unknown): boolean => {
5759

5860
export const OUT_OF_CREDITS_MESSAGE = `Out of credits. Please add credits at ${defaultAppUrl}/usage`
5961

60-
export const FREE_MODE_UNAVAILABLE_MESSAGE =
61-
'Free mode is not available outside of the United States and Canada. Please upgrade to a paid plan to use Codebuff outside the US and Canada.'
62+
export const FREE_MODE_UNAVAILABLE_MESSAGE = IS_FREEBUFF
63+
? 'Freebuff is not available in your country.'
64+
: 'Free mode is not available in your country. You can use another mode to continue.'
6265

6366
export const createErrorMessage = (
6467
error: unknown,

docs/error-schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Used for errors that the client needs to identify programmatically:
3535
| Status | `error` code | Example `message` |
3636
|--------|-------------|-------------------|
3737
| 403 | `account_suspended` | `"Your account has been suspended due to billing issues. Please contact support@codebuff.com to resolve this."` |
38-
| 403 | `free_mode_unavailable` | `"Free mode is not available in your country."` |
38+
| 403 | `free_mode_unavailable` | `"Free mode is not available in your country."` (Freebuff: `"Freebuff is not available in your country."`) |
3939
| 429 | `rate_limit_exceeded` | `"Subscription weekly limit reached. Your limit resets in 2 hours. Enable 'Continue with credits' in the CLI to use a-la-carte credits."` |
4040

4141
### Catch-all server error

freebuff/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ freebuff
2121

2222
**Simple** — No modes. No config. Just works.
2323

24-
**Fast** — 5–10× speed up. 3–5× tokens per second compared to Claude, plus context gathering in seconds.
24+
**Fast** — 5–10× speed up. Faster models plus context gathering in seconds rather than minutes.
2525

2626
**Loaded** — Built-in web research, browser use, and more.
2727

@@ -58,6 +58,8 @@ freebuff
5858

5959
**Are you training on my data?** No. We only use model providers that do not train on our requests. Your code stays yours.
6060

61+
**Which countries is Freebuff available in?** Freebuff is currently available in select countries. See [freebuff.com](https://freebuff.com) for the full list.
62+
6163
**What data do you store?** We don't store your codebase. We only collect minimal logs for debugging purposes.
6264

6365
## How It Works

freebuff/web/src/app/home-client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const faqs = [
3434
{
3535
question: 'Which countries is Freebuff available in?',
3636
answer:
37-
'Freebuff is currently available in the United States, Canada, United Kingdom, Australia, Norway, Sweden, Netherlands, Denmark, Germany, Finland, Belgium, Luxembourg, Switzerland, Ireland, and Iceland.',
37+
'Freebuff is currently available in the United States, Canada, United Kingdom, Australia, New Zealand, Norway, Sweden, Netherlands, Denmark, Germany, Finland, Belgium, Luxembourg, Switzerland, Ireland, and Iceland.',
3838
},
3939
{
4040
question: 'Are you training on my data?',

0 commit comments

Comments
 (0)