-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(webinar): refactor webinar error function and add handle new err…
…orcode (#4047)
- Loading branch information
Showing
10 changed files
with
130 additions
and
60 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
packages/@webex/plugin-meetings/src/common/errors/join-webinar-error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {ERROR_DICTIONARY} from '../../constants'; | ||
|
||
/** | ||
* Error occurred while join the webinar | ||
*/ | ||
export default class JoinWebinarError extends Error { | ||
code: number; | ||
error: any; | ||
sdkMessage: string; | ||
|
||
/** | ||
* @constructor | ||
* @param {String} [message] | ||
* @param {Object} [error] | ||
*/ | ||
constructor(message: string = ERROR_DICTIONARY.JoinWebinarError.MESSAGE, error: any = null) { | ||
super(message); | ||
this.name = ERROR_DICTIONARY.JoinWebinarError.NAME; | ||
this.sdkMessage = ERROR_DICTIONARY.JoinWebinarError.MESSAGE; | ||
this.error = error; | ||
this.stack = error ? error.stack : new Error().stack; | ||
this.code = ERROR_DICTIONARY.JoinWebinarError.CODE; | ||
} | ||
} |
27 changes: 0 additions & 27 deletions
27
packages/@webex/plugin-meetings/src/common/errors/webinar-registration-error.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.