Dolby Voxeet error handling - Multiple logs of the same error #8
-
Hi. I am working on the implementation of conference features on the WEB app using VoxeetSDK. I have great experience with the process, and pretty much everything is working fine. I have some issues with handling the errors properly though. I will give specific case that gives me most trouble. I have to note that this is not a great blocker, it just annoyance that I would like to remove if possible. I've attached the image with the issue. I have a React component called meetingControls, with the button to join the conference. The conference ID is sent through URL Params. I am intentionally providing the wrong ID in this case, and in the image above you can see what happens when I try to join the conference with that wrong ID. Note that I intentionally didn't catch any error for the purposes of providing this example.
try { Basically what is happening is that I am getting the same error multiple times from multiple sources it seems. And It feels a little weird to deal with all of them all over the place. Especially as it might happen with some other errors that I didn't yet encounter, leaving me to write error handling code all over the place, and some of them like webrtc error log I cannot even deal with. Do you have some suggestions for this? Maybe I am doing some stuff wrong. It would be amazing if docs would mention how to deal with error handling properly, I found some bit and pieces, but it's a bit confusing what's going on and what should happen. I appreciate the help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I see and can confirm that when using fetch() with a Are you creating the conference server-side using the REST API or client-side with the Web SDK? If you are doing the creation of conferences entirely within the client application, the create() would be appropriate to use. In either case, it could be difficult to keep track of error handling if you were using try {
conference = await VoxeetSDK.conference.fetch(conferenceOptions);
if (conference.status === undefined) {
throw new Error("Conference has not yet been created.");
}
} catch (error) {
console.log(error);
}
await VoxeetSDK.conference.join(conference, joinOptions); This way you can first determine whether or not the conference exists and handle appropriately before trying to |
Beta Was this translation helpful? Give feedback.
I tried to simplify the example and missed a few important details.
Generally, using the
create()
function instead offetch()
will yield better results since it already has logic to handle when the conference already exists or not.You can add an error handler for events which helps with suppression of some of the duplicate errors in the lower level sdk logs and inspecting the status:
The
conference.status
check is really only useful for providing application logic on how to proceed next, as you observed and not as helpful for verifyi…