ClickHouse/clickhouse-js

Don't throw in Ping command

slvrtrn opened this issue · 0 comments

It just throws if it fails to connect, which is a bit awkward.

We can either just return false on a failed attempt or change the method signature to be some variation of Either concept to allow further debugging on the application side:

type PingResult = {
  type: 'Success'
} | {
  type: 'Failure'
  error: Error
}