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

Better messaging for componentDidCatch cross-origin errors #10447

Merged

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Aug 12, 2017

The prior message was a bit wordy and didn't cover all cases (like the one we discovered while researching #10441).

We can use the new URL to explain background info on the DEV-mode technique we're using in addition to common fixes (eg crossorigin attribute for CDN scripts and Webpack devtools settings). Putting this information behind a link will allow us to more easily edit it in the future as common causes for this issue change.

Resolves #10441

Note I have not yet setup the fb.me/react-crossorigin-error shortcut or written the content that will live there. It's been a long day and I'm taking off. Technically we can merge this at any time (to unblock the RC) and just follow-up with the link soon. Or I'll add it on Monday if we're not in a hurry. 😄

'has a `crossorigin` attribute, and that it is served with the ' +
'`Access-Control-Allow-Origin: *` HTTP header. ' +
'See https://fb.me/react-cdn-crossorigin',
"A cross-origin error was thrown so React doesn't have access to " +
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we remove the "so" and make it two separate sentences?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure~

The prior message was a bit wordy and didn't cover all cases (like the one we discovered while researching facebook#10441).

We can use the new URL to explain background info on the DEV-mode technique we're using in addition to common fixes (eg crossorigin attribute for CDN scripts and Webpack devtools settings). Putting this information behind a link will allow us to more easily edit it in the future as common causes for this issue change.

Resolves facebook#10441
@bvaughn bvaughn force-pushed the componentDidError-cross-origin-message branch from 9020177 to b906a0a Compare August 12, 2017 00:58
@bvaughn bvaughn merged commit 6c6ff8c into facebook:master Aug 14, 2017
@bvaughn bvaughn deleted the componentDidError-cross-origin-message branch August 14, 2017 18:25
@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 14, 2017

New docs page follow-up in #10457

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

Successfully merging this pull request may close these issues.

Cross-origin error passed to componentDidCatch incorrectly
4 participants