Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] add code and subcode to callError #5672

Merged
merged 10 commits into from
Feb 28, 2025

Conversation

dmceachernmsft
Copy link
Member

@dmceachernmsft dmceachernmsft commented Feb 27, 2025

What

Add code and cubcode to the calling error

Why

Calling provides a series of codes and subcodes to help customers debug what happened when a error occurs so we are proxying them up through our errors as well

https://skype.visualstudio.com/SPOOL/_workitems/edit/3999557

How Tested

Validated locally
image
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

The PR adds error code and subCode properties to the CallError class to better propagate error details from the calling service. It also updates the API definitions in both beta and stable releases and adds an error event listener in the sample application.

Reviewed Changes

File Description
packages/calling-stateful-client/src/CallClientState.ts Extends CallError to extract and expose code and subCode from CommunicationServicesError
packages/communication-react/review/beta/communication-react.api.md Updates CallError API to include code and subCode properties
packages/communication-react/review/stable/communication-react.api.md Updates CallError API to include code and subCode properties
samples/Calling/src/app/views/CallScreen.tsx Adds an error event listener for logging adapter errors

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Copy link
Contributor

Copy link
Contributor

github-actions bot commented Feb 27, 2025

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 28005 / 44666
62.69%
28005 / 44666
62.69%
786 / 1436
54.73%
2378 / 3733
63.7%
Current 28072 / 44682
62.82%
28072 / 44682
62.82%
786 / 1436
54.73%
2356 / 3726
63.23%
Diff 67 / 16
0.13%
67 / 16
0.13%
0 / 0
0%
-22 / -7
-0.47%

Copy link
Contributor

github-actions bot commented Feb 27, 2025

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 58258 / 94221
61.83%
58258 / 94221
61.83%
1177 / 2693
43.7%
3548 / 5835
60.8%
Current 58269 / 94248
61.82%
58269 / 94248
61.82%
1177 / 2693
43.7%
3521 / 5823
60.46%
Diff 11 / 27
-0.01%
11 / 27
-0.01%
0 / 0
0%
-27 / -12
-0.34%

*/
if (this.callId === latestEndedCall?.id) {
this.emitter.emit('callEnded', {
callId: latestEndedCall?.id,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

Copy link
Contributor

Copy link
Contributor

@dmceachernmsft
Copy link
Member Author

Breaking change check is added as the selector hook is impacted by the CallError change

@dmceachernmsft dmceachernmsft enabled auto-merge (squash) February 28, 2025 18:49
Copy link
Contributor

Calling bundle size is not changed.

  • Current size: 12401100
  • Base size: 12401100
  • Diff size: 0

Copy link
Contributor

CallWithChat bundle size is not changed.

  • Current size: 12401112
  • Base size: 12401112
  • Diff size: 0

Copy link
Contributor

Chat bundle size is not changed.

  • Current size: 1777281
  • Base size: 1777281
  • Diff size: 0

Copy link
Contributor

@dmceachernmsft dmceachernmsft merged commit a19b51c into main Feb 28, 2025
41 checks passed
@dmceachernmsft dmceachernmsft deleted the dmceachernmsft/onError-code-sub branch February 28, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants