Skip to content

DevTools: Correctly log errors reported from the store#22950

Merged
jstejada merged 1 commit intofacebook:mainfrom
jstejada:store-errors
Dec 13, 2021
Merged

DevTools: Correctly log errors reported from the store#22950
jstejada merged 1 commit intofacebook:mainfrom
jstejada:store-errors

Conversation

@jstejada
Copy link
Copy Markdown
Contributor

Summary

#22948 added (internal-only) logging to errors caught via componentDidCatch, however, this wouldn't account for the case when we handle an error reported from the store, since in that case we are manually setting the error state and that doesn't trigger componentDidCatch

In order to fix that, we also log when an error is reported by the store.

How did you test this change?

Manually throw an error from the store, verify it goes through our logging

@jstejada jstejada merged commit 5757919 into facebook:main Dec 13, 2021
@jstejada jstejada deleted the store-errors branch December 13, 2021 17:03
Copy link
Copy Markdown
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

Nice catch

zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
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.

3 participants