Twice now my error identification logic has overwritten a NotAllowedError message with one that is spec-accurate but completely obfuscates the real issue that becomes obvious if one could read it:
A NotAllowedError reporting "Operation failed" from a Conditional UI call due to an iOS Safari bug
In both instances I overwrote these messages with "User clicked cancel, or the authentication ceremony timed out" because it was the second of two possible reasons the error would be raised. Clearly platforms are using this error type to report platform-specific errors, though, and so I should stop overwriting these messages to make it easier for RP's to diagnose issues that aren't library-specific.
Twice now my error identification logic has overwritten a
NotAllowedError
message with one that is spec-accurate but completely obfuscates the real issue that becomes obvious if one could read it:NotAllowedError
reporting "Operation failed" from a Conditional UI call due to an iOS Safari bugNotAllowedError
reporting a Chrome-specific block on WebAuthn due to an invalid TLS connectionIn both instances I overwrote these messages with "User clicked cancel, or the authentication ceremony timed out" because it was the second of two possible reasons the error would be raised. Clearly platforms are using this error type to report platform-specific errors, though, and so I should stop overwriting these messages to make it easier for RP's to diagnose issues that aren't library-specific.