databricks-sql-nodejs
databricks-sql-nodejs copied to clipboard
[PECO-730] Fine-grained exception classes
- Derive all errors from common base class (to easily distinguish between errors from the library and other using
instanceof) - Replace widely used
HiveDriverErrorwith dedicated error classes (same reason as above - soinstanceofcan be used to pick up specific error type) - Introduce error codes where appropriate
- Wrap Thrift errors (to hide thrift-specific details a bit, and also to make handling of HTTP errors much easier)
- Pick up error messages from Databricks-specific headers (same as in PySQL https://github.com/databricks/databricks-sql-python/blob/6f8314459736762cabab59ddfaf743dc41030c96/src/databricks/sql/thrift_backend.py#L209-L230)