You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to handle errors based on the GATT status, but the GattStatusException doesn't expose that. Currently, I can work around this by checking the exception message, but a nicer solution would be great!
The text was updated successfully, but these errors were encountered:
Totally agree, checking GATT status via the message is quite fragile.
Need to determine if there is an elegant way to expose the status in a platform agnostic way.
In other words, need to determine if the GATT statuses (which represent non-success) have enough overlap between the platforms to try and translate the platform specific statuses to a common structure (e.g. enum or similar).
Currently, the exceptions are propagated as:
Android: GattStatusException
Apple: IOException (with NSError description as message)
JavaScript: native failure type (from Promise)
...so this is already exposing inconsistency between the supported platforms. When I have some time I'll see if we can come up with a better API.
I would like to handle errors based on the GATT status, but the
GattStatusException
doesn't expose that. Currently, I can work around this by checking the exceptionmessage
, but a nicer solution would be great!The text was updated successfully, but these errors were encountered: