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

[nextjs] Improve error message when CLI env vars are missing #6123

Closed
lobsterkatie opened this issue Nov 3, 2022 · 0 comments · Fixed by #7434
Closed

[nextjs] Improve error message when CLI env vars are missing #6123

lobsterkatie opened this issue Nov 3, 2022 · 0 comments · Fixed by #7434

Comments

@lobsterkatie
Copy link
Member

lobsterkatie commented Nov 3, 2022

If someone doesn't set the right environment variables in prod (specifically their sentry-cli auth token), they get an error message (Sentry reported an error: Authentication credentials were not provided. (http status: 401))which isn't wrong but also isn't as helpful as it could be. Because of the way the nextjs wizard sets things up (a locally-created but then git-ignored .sentryclirc file), it's easy for people to run into this. (The Vercel integration solves it, but not everyone deploys on Vercel.) See here for someone running into this exact problem.

Though the error comes from sentry-cli, we should be able to catch it, either in the webpack plugin or the nextjs SDK, and point people to a solution rather than just stating the problem.

(We might also think about trying to cut this problem off at the pass by telling people in the wizard that though we've set it up for them locally, they'll have to set their auth token in any other environment for things to work.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant