fix(external-api): Avoid naming event 'error'

- EventEmmitter treats 'error' as a special case and throws error.
This commit is contained in:
hmuresan 2021-09-02 19:30:18 +03:00 committed by Horatiu Muresan
parent 9a8b67a0a4
commit 00b5ce71e0
2 changed files with 2 additions and 2 deletions

View File

@ -1333,7 +1333,7 @@ class API {
*/
notifyError(error: Object) {
this._sendEvent({
name: 'error',
name: 'error-occurred',
error
});
}

View File

@ -81,7 +81,7 @@ const events = {
'device-list-changed': 'deviceListChanged',
'display-name-change': 'displayNameChange',
'email-change': 'emailChange',
'error': 'error',
'error-occurred': 'errorOccurred',
'endpoint-text-message-received': 'endpointTextMessageReceived',
'feedback-submitted': 'feedbackSubmitted',
'feedback-prompt-displayed': 'feedbackPromptDisplayed',