Skip to content

Issue : - Frequent Cor's Errors which Dev's building on wasp are getting #2978

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xTaneja
Copy link
Contributor

Description

closes #2933

Select what type of change this PR introduces:

  1. Just code/docs improvement (no functional change).
  2. Bug fix (non-breaking change which fixes an issue).
  3. New feature (non-breaking change which adds functionality).
  4. Breaking change (fix or feature that would cause existing functionality to not work as expected).

Description

Many users deploy a Wasp app, hit the client, and see CORS error in the browser console even though the real cause is a missing env-var or other 5xx on the server.
This happens because the response that bubbles up from a crashed server has no Access-Control-Allow-Origin header, so the browser rewrites the failure as a CORS issue and hides the actual JSON body.

I maybe wrong on the issue but the only problem regarding the CORS which i found out in our codebase was it,

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.

CORS errors in browser upon server errors (500) - what can we do about that?
1 participant