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

Improve experience when REACT_APP_PRISMA_SERVICE is missing #237

Open
hgwood opened this issue Oct 15, 2019 · 1 comment
Open

Improve experience when REACT_APP_PRISMA_SERVICE is missing #237

hgwood opened this issue Oct 15, 2019 · 1 comment

Comments

@hgwood
Copy link
Contributor

hgwood commented Oct 15, 2019

Is your feature request related to a problem? Please describe.

It has happen to me twice now that I want to setup FAQ, and when I open localhost:3000 in my browser, the loader spins infinitely, there are no errors in any terminal, and I remain confused.

The problem and cause are described in #196. In a nutshell, when the env var REACT_APP_PRISMA_SERVICE is missing in client/.env.local, then the client makes a call to the back-end with an incorrect URL. The back-end responds 200 with HTML but the front-end expects JSON and the parsing fails.

Describe the solution you'd like

I'd like the front-end to check that REACT_APP_PRISMA_SERVICE has a value, and display a nice error if it does not.

@Errorname
Copy link
Contributor

Errorname commented Oct 15, 2019

Indeed, that would improve the DX of the project. However, since REACT_APP_PRISMA_SERVICE is only used/needed when in node_env=development, we need to make sure we won't display the error in prod

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

No branches or pull requests

2 participants