Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about mapping Scanning promises to Windows Bluetooth States #531

Open
usivagna opened this issue Nov 17, 2020 · 1 comment
Open

Comments

@usivagna
Copy link

In the scanning spec promises are rejected with either a TypeError, NotAllowedError, NotSupportedError, InvalidStateError or UnknownError. How would these errors map/overlap to error states in operating systems like Windows?

OS state Description Mapping to State in Scanning Spec
ConsentRequired 8 The operation requires consent. NotAllowedError?
DisabledByPolicy 5 The operation is disabled by policy. NotAllowedError?
DisabledByUser 7 The operation is disabled by the user. NotAllowedError?
NotSupported 6 The operation is not supported on the current Bluetooth radio hardware. NotSupportedError?
OtherError 4 An unexpected error has occurred. UnknownError
RadioNotAvailable 1 The Bluetooth radio was not available. This error occurs when the Bluetooth radio has been turned off. InvalidStateError?
ResourceInUse 2 The operation cannot be serviced because the necessary resources are currently in use. UnknownError?
TransportNotSupported 9 The transport is not supported. NotSupportedError?
@reillyeon
Copy link
Contributor

I would probably map RadioNotAvailable to NotSupportedError and ResourceInUse to InvalidStateError but otherwise these mappings seem reasonable. I'd say the implementation in Chromium probably maps more of these errors than it should to NetworkError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants