Handles errors during FIDO2 operations, setting errorCode to the appropriate WebAuthn DOMException name.