How do I confirm user permission for mediaDevices correctly?

It’s safe to say the snippet below will error any-time there’s a problem but between all browsers, that DOMExecution is a different response. I could go ahead and collect them all and be compliant this way but are there other ways?

This is what I use to soft-check:

try {
  await navigator.mediaDevices.getUserMedia({
    audio: true,
    video: true
  });
} catch (e) {
  Message.receive.public(`Media Error: ${e.message}.`);
}

I would return and call it quits if there’s a catch, but during media-selection there’s possibly 1 out of many devices in use and that will throw an error and with my app that won’t matter they can try the device any ways to see if it produces or not.