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

feat: allow undefined client token #208

Closed
wants to merge 1 commit into from

Conversation

joschan21
Copy link
Contributor

No description provided.

Copy link

linear bot commented Nov 5, 2024

@joschan21 joschan21 requested a review from CahidArda November 5, 2024 08:55
Comment on lines +277 to +284
throw new Error(
"QStash token is required!\n\n" +
"To fix this:\n" +
"1. Get your token from the Upstash Console (https://console.upstash.com/qstash)\n" +
"2. Initialize the client with:\n\n" +
" const client = new Client({\n" +
" token: '<YOUR_QSTASH_TOKEN>'\n" +
" });"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we had issues with throwing in the constructor if the token is missing in redis. more info available here upstash/redis-js#1311

I would prefer if we don't throw but simply log a warning

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what was the issue? Afaik stripe also throws and their dx is incredible, logging is a bit harder to see

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if redis-js is used in turbo repo, it gets an error at compile time unless the env upstash env variables are specified in the turbo.json file.

@CahidArda CahidArda closed this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants