How to catch errors when the device does not support AR?

Hi there,
These devices are known to support AR
Viewing 3D models in AR on mobile devices requires relatively recent hardware and software.

  • iOS: iPhone 7 and newer or iPad 5 and newer, running iOS 12+
  • Android: Devices with ARCore 1.9 support on Android 8+

I simulated the iphone 8 iOS 11 by BrowserStack, but the startAR method didn’t catch the error.
The callback has one parameter: an error or null if the operation succeeded.

api.startAR(function(err) {
    if (!err) {
        window.console.log('Starting AR');
    }
});

This is what the page looks like when it launches.

Obviously this should not be presented to the user.

Is there any way to catch errors?

Any advise appreciated.

Thanks!