Right now bluetooth gatt errors are translated and surfaced entirely by the implementing subclass (e.g., the class that handles bluez gatt operation translates bluez errors into web bluetooth specific error).
However, there are a standard set of GATT errors (BT 4.2 Vol 3 Part F 3.4.1.1 Error Response), and there is a standard translation to Web Bluetooth errors.
https://webbluetoothcg.github.io/web-bluetooth/#error-handling
We should have some degree of abstraction so that errors conforming to the standard BT GATT errors are translated to the appropriate Web Bluetooth errors without the work of the implementing subclass.
Once this is working, we should be able to remove most of the GATT error handling logic in device/bluetooth/test.
Comment 1 by cco3@chromium.org
, Oct 4 2017