diff --git a/desktop/flipper-frontend-core/src/AbstractClient.tsx b/desktop/flipper-frontend-core/src/AbstractClient.tsx index 4b831f134..0730a3bf1 100644 --- a/desktop/flipper-frontend-core/src/AbstractClient.tsx +++ b/desktop/flipper-frontend-core/src/AbstractClient.tsx @@ -357,6 +357,9 @@ export default abstract class AbstractClient extends EventEmitter { const plugin = params ? params.api : undefined; + const baseErrorMessage = `Unable to send ${params?.method ?? method} to ${ + params?.api ?? 'FlipperCore' + }`; console.debug(data, 'message:call'); const mark = this.getPerformanceMark(metadata); @@ -391,12 +394,12 @@ export default abstract class AbstractClient extends EventEmitter { }); } } catch (error) { - reject(new Error('Unable to send, connection error: ' + error)); + reject(new Error(`${baseErrorMessage}, connection error: ${error}`)); } } else { reject( new Error( - `Cannot send ${method}, client is not accepting messages for plugin ${plugin}`, + `${baseErrorMessage}, client is not accepting messages for plugin ${plugin}`, ), ); } diff --git a/desktop/plugins/public/layout/Inspector.tsx b/desktop/plugins/public/layout/Inspector.tsx index cb3d0f0bf..96d7054e9 100644 --- a/desktop/plugins/public/layout/Inspector.tsx +++ b/desktop/plugins/public/layout/Inspector.tsx @@ -108,7 +108,9 @@ export default class Inspector extends Component { label: 'Focus', click: (id: ElementID) => { if (this.props.client.isConnected) { - this.props.client.call('onRequestAXFocus', {id}); + this.props.client + .call('onRequestAXFocus', {id}) + .catch((e) => console.warn('Unable to request AX focus', e)); } }, },