Allow user to reset ui debugger after fatal error
Summary: Previously there was no way to get of this state Reviewed By: aigoncharov Differential Revision: D46803900 fbshipit-source-id: 2eb0eb41b58064659ef1d2cff245a2b8d7e2f261
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f9bbc967ea
commit
ae5dd80d67
@@ -50,11 +50,16 @@ export function Component() {
|
||||
setBottomPanelComponent(undefined);
|
||||
};
|
||||
|
||||
if (streamState.state === 'UnrecoverableError') {
|
||||
if (streamState.state === 'FatalError') {
|
||||
return (
|
||||
<StreamInterceptorErrorView
|
||||
title="Oops"
|
||||
message="Something has gone horribly wrong, we are aware of this and are looking into it"
|
||||
title="Fatal Error"
|
||||
message={`Something has gone horribly wrong, we are aware of this and are looking into it, details ${streamState.error.name} ${streamState.error.message}`}
|
||||
button={
|
||||
<Button onClick={streamState.clearCallBack} type="primary">
|
||||
Reset
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -64,7 +69,11 @@ export function Component() {
|
||||
<StreamInterceptorErrorView
|
||||
message={streamState.error.message}
|
||||
title={streamState.error.title}
|
||||
retryCallback={streamState.retryCallback}
|
||||
button={
|
||||
<Button onClick={streamState.retryCallback} type="primary">
|
||||
Retry
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user