Skip to content

Commit 2d86ade

Browse files
[STREAM-850] - Suppressing benign error so it does not show up on UI and cause confusion (#940)
1 parent 7414410 commit 2d86ade

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

66
# [Unreleased](https://github.com/MyPureCloud/genesys-cloud-webrtc-sdk/compare/v11.3.0...HEAD)
7+
# Changed
8+
* [STREAM-850](https://inindca.atlassian.net/browse/STREAM-850) - Suppress `error.ininedgecontrol.session.inactive` errors to prevent consuming UIs from presenting benign errors
79

810
# [v11.3.0](https://github.com/MyPureCloud/genesys-cloud-webrtc-sdk/compare/v11.2.3...v11.3.0)
911
# Added

src/sessions/softphone-session-handler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ export class SoftphoneSessionHandler extends BaseSessionHandler {
392392
callState: ICallStateFromParticipant
393393
): void {
394394
if (callState.errorInfo) {
395+
if (callState.errorInfo.code === 'error.ininedgecontrol.session.inactive') {
396+
return;
397+
}
395398
this.debouncedEmitCallError(update, participant, callState);
396399
}
397400
}

test/unit/sessions/softphone-session-handler.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2550,6 +2550,22 @@ describe('checkForCallErrors', () => {
25502550

25512551
expect(spy).not.toHaveBeenCalled();
25522552
});
2553+
2554+
it('should return out if call error is inactive with "is inactive for" message', () => {
2555+
const update = { id: 'convoUpdate' };
2556+
const participant = { id: 'participantId' };
2557+
const callState = {
2558+
errorInfo: {
2559+
code: 'error.ininedgecontrol.session.inactive',
2560+
message: 'is inactive for 10 seconds'
2561+
}
2562+
};
2563+
2564+
const spy = jest.spyOn(handler, 'debouncedEmitCallError');
2565+
handler.checkForCallErrors(update as any, participant as any, callState as any);
2566+
2567+
expect(spy).not.toHaveBeenCalled();
2568+
});
25532569
});
25542570

25552571
describe('getActiveConversations', () => {

0 commit comments

Comments
 (0)