diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts index 1383ffbc3..bb5222a23 100644 --- a/src/webex/wxApi.ts +++ b/src/webex/wxApi.ts @@ -85,6 +85,10 @@ async function callBackend( ): Promise { return new Promise((resolve, reject) => { chrome.runtime.sendMessage({ type, detail }, (resp) => { + if (chrome.runtime.lastError) { + console.log("Error calling backend"); + reject(new Error(`Error contacting backend: chrome.runtime.lastError.message`)); + } if (typeof resp === "object" && resp && resp.error) { console.warn("response error:", resp) const e = new WalletApiError(resp.error.message, resp.error);