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:
Luke De Feo
2023-06-19 05:06:52 -07:00
committed by Facebook GitHub Bot
parent f9bbc967ea
commit ae5dd80d67
4 changed files with 30 additions and 21 deletions

View File

@@ -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>
}
/>
);
}