Summary
In packages/ringcentral-integration/modules/Call/Call.ts, the catch block in call() guards the fallback internalError alert with AvailabilityMonitor.checkIfHAError(error). That method is async and returns a Promise, but it isn't awaited. !<Promise> is always false, so whenever an AvailabilityMonitor is registered, the fallback danger alert never fires — call failures that don't match an earlier branch (e.g. a make-call transport timeout) fail silently for the user.
cc @embbnux — noticed while investigating ringcentral/ringcentral-embeddable#1215 (PR not filed yet). Since you're ~12h ahead, flagging here in case it's a quick overnight fix.
Location
modules/Call/Call.ts, in the call() catch (error) block:
} else if (error.message !== 'Refresh token has expired') {
if (
!this._deps.availabilityMonitor ||
!this._deps.availabilityMonitor.checkIfHAError(error) // ⬅️ not awaited
) {
this._deps.alert.danger({
message: callErrors.internalError,
payload: error,
});
}
}
AvailabilityMonitor.checkIfHAError is async:
async checkIfHAError(error) { ... return isHAError(error) || errMessage === errorMessages.serviceLimited; }
Impact
- With an
AvailabilityMonitor registered, !checkIfHAError(error) is !Promise → always false, so the internalError alert is never shown.
- Non-classified call errors (e.g. a make-call timeout with a
.message and no .response) surface no UI at all; the error is rethrown and swallowed by the caller (DialerUI.call only console.logs it).
- Downstream apps (e.g. RingCentral Embeddable) see calls "silently" fail with no banner.
Suggested fix
Await the async check (the enclosing call() is already async):
} else if (error.message !== 'Refresh token has expired') {
if (
!this._deps.availabilityMonitor ||
!(await this._deps.availabilityMonitor.checkIfHAError(error))
) {
this._deps.alert.danger({
message: callErrors.internalError,
payload: error,
});
}
}
Note: ActiveCallControl in RingCentral Embeddable already uses the awaited form (!(await this._deps.availabilityMonitor?.checkIfHAError(error))), which appears to be the intended pattern.
Version
@ringcentral-integration/commons@0.14.0
Summary
In
packages/ringcentral-integration/modules/Call/Call.ts, thecatchblock incall()guards the fallbackinternalErroralert withAvailabilityMonitor.checkIfHAError(error). That method isasyncand returns aPromise, but it isn'tawaited.!<Promise>is alwaysfalse, so whenever anAvailabilityMonitoris registered, the fallback danger alert never fires — call failures that don't match an earlier branch (e.g. a make-call transport timeout) fail silently for the user.cc @embbnux — noticed while investigating ringcentral/ringcentral-embeddable#1215 (PR not filed yet). Since you're ~12h ahead, flagging here in case it's a quick overnight fix.
Location
modules/Call/Call.ts, in thecall()catch (error)block:AvailabilityMonitor.checkIfHAErrorisasync:Impact
AvailabilityMonitorregistered,!checkIfHAError(error)is!Promise→ alwaysfalse, so theinternalErroralert is never shown..messageand no.response) surface no UI at all; the error is rethrown and swallowed by the caller (DialerUI.callonlyconsole.logs it).Suggested fix
Await the async check (the enclosing
call()is alreadyasync):Note:
ActiveCallControlin RingCentral Embeddable already uses the awaited form (!(await this._deps.availabilityMonitor?.checkIfHAError(error))), which appears to be the intended pattern.Version
@ringcentral-integration/commons@0.14.0