databricks-sql-nodejs icon indicating copy to clipboard operation
databricks-sql-nodejs copied to clipboard

[PECO-730] Fine-grained exception classes

Open kravets-levko opened this issue 2 years ago • 0 comments

PECO-730

  • Derive all errors from common base class (to easily distinguish between errors from the library and other using instanceof)
  • Replace widely used HiveDriverError with dedicated error classes (same reason as above - so instanceof can 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)

kravets-levko avatar May 17 '23 12:05 kravets-levko