You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently catching error names and handling them by a switch case when calling functions listVideoInputDevices, listAudioInputDevices, chooseVideoInputDevice, chooseAudioInputDevice. However, the chime JS sdk rethrows errors leading to generic errors, although the error.message property is preserved. In the handleGetUserMediaError function, the base error GetUserMediaError doesn't preserve the original error.name property.
Disable browser audio/video permissions then call any of the listed functions above. The functions that throw GetUserMediaError or a subclass of it has the error.name property Error although the original error name was more specific.
Amazon Chime SDK for JavaScript version
2.21.0
What browsers are you seeing the problem on?
Chrome
Browser version
95.0.4638.69
Meeting and Attendee ID Information.
No response
Browser console logs
n/a
The text was updated successfully, but these errors were encountered:
I created PR #1815 to address this issue but for now you can check the error name via error.cause.name.
catch (error) {
if (error instanceof GetUserMediaError) {
// Use error.cause?.name to access an Error name and error.cause?.message to access the original error messasge.
}
}
What happened and what did you expect to happen?
We are currently catching error names and handling them by a switch case when calling functions
listVideoInputDevices
,listAudioInputDevices
,chooseVideoInputDevice
,chooseAudioInputDevice
. However, the chime JS sdk rethrows errors leading to generic errors, although theerror.message
property is preserved. In thehandleGetUserMediaError
function, the base errorGetUserMediaError
doesn't preserve the originalerror.name
property.Have you reviewed our existing documentation?
Reproduction steps
Disable browser audio/video permissions then call any of the listed functions above. The functions that throw
GetUserMediaError
or a subclass of it has theerror.name
propertyError
although the original error name was more specific.Amazon Chime SDK for JavaScript version
2.21.0
What browsers are you seeing the problem on?
Chrome
Browser version
95.0.4638.69
Meeting and Attendee ID Information.
No response
Browser console logs
n/a
The text was updated successfully, but these errors were encountered: