Fixed error in error handling
Summary: During component cleanup broke the error handling :'). Causing plugin errors to bubble up and be handled as chrome errors instead. This caused our soft crash metric to spike in the last week. Changelog: Fixed error handling of UI errors caused by plugins Reviewed By: passy Differential Revision: D29585448 fbshipit-source-id: 4c5d40b300a7b71eeb532f7be4765f742d239890
This commit is contained in:
committed by
Facebook GitHub Bot
parent
17e064294c
commit
88d6d000c8
@@ -79,7 +79,9 @@ export default class ErrorBoundary extends Component<
|
|||||||
<ErrorBoundaryContainer grow>
|
<ErrorBoundaryContainer grow>
|
||||||
<Heading>{heading}</Heading>
|
<Heading>{heading}</Heading>
|
||||||
{this.props.showStack !== false && (
|
{this.props.showStack !== false && (
|
||||||
<ErrorBoundaryStack>{error}</ErrorBoundaryStack>
|
<ErrorBoundaryStack>{`${
|
||||||
|
error.stack ?? error.toString()
|
||||||
|
}`}</ErrorBoundaryStack>
|
||||||
)}
|
)}
|
||||||
<Button onClick={this.clearError}>Clear error and try again</Button>
|
<Button onClick={this.clearError}>Clear error and try again</Button>
|
||||||
</ErrorBoundaryContainer>
|
</ErrorBoundaryContainer>
|
||||||
|
|||||||
Reference in New Issue
Block a user