Handle traversal error

Summary: Log as console . error so we get a log view and inform the user

Reviewed By: lblasa

Differential Revision: D50450794

fbshipit-source-id: 0eb1877eec4d602d6673dd2815af2692e89b2523
This commit is contained in:
Luke De Feo
2023-10-24 04:10:29 -07:00
committed by Facebook GitHub Bot
parent cd4640326c
commit 05242b4ee9
3 changed files with 40 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ import {checkFocusedNodeStillActive} from './plugin/ClientDataUtils';
import {uiActions} from './plugin/uiActions';
import {first} from 'lodash';
import {getNode} from './utils/map';
import {handleTraversalError} from './plugin/traversalError';
export function plugin(client: PluginClient<Events, Methods>) {
const rootId = createState<Id | undefined>(undefined);
@@ -114,6 +115,8 @@ export function plugin(client: PluginClient<Events, Methods>) {
});
});
handleTraversalError(client);
client.onConnect(() => {
uiState.isConnected.set(true);
console.log('[ui-debugger] connected');