Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release History

## Unreleased
- Add an internal `ErrorCategory` type and category constants in `internal/errors` for telemetry error classification. No behavior change: the type is not read or attached anywhere yet (databricks/databricks-sql-go#414)

## v1.14.0 (2026-07-13)
- **Minimum Go version is now 1.25.0** (previously 1.20): the `go` directive was raised to 1.25.0 while clearing OSV-Scanner findings and updating dependencies. Consumers building with an older toolchain will need to upgrade Go (databricks/databricks-sql-go#368)
- Fix panic in `InitThriftClient` when the endpoint URL is malformed: the thrift transport was type-asserted to `*thrift.THttpClient` before the error from `NewTHttpClientWithOptions` was checked, so a URL that fails to parse (nil transport) caused `interface conversion: thrift.TTransport is nil, not *thrift.THttpClient`; the error is now returned instead (databricks/databricks-sql-go#394)
Expand Down
30 changes: 30 additions & 0 deletions internal/errors/category.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package errors

// ErrorCategory is a source-declared classification for a driver error, so
// telemetry can read the category directly instead of inferring it from the
// error message.
type ErrorCategory string

const (
CategoryTimeout ErrorCategory = "timeout"
CategoryCancelled ErrorCategory = "cancelled"
CategoryConnectionError ErrorCategory = "connection_error"
CategoryAuthError ErrorCategory = "auth_error"
CategoryPermissionError ErrorCategory = "permission_error"
CategoryNotFound ErrorCategory = "not_found"
CategorySyntaxError ErrorCategory = "syntax_error"
CategoryInvalidRequest ErrorCategory = "invalid_request"
CategoryGeneric ErrorCategory = "error"
CategoryChunkDownload ErrorCategory = "chunk_download_error"
CategoryDecompression ErrorCategory = "decompression_error"
CategoryArrowSchemaParsing ErrorCategory = "arrow_schema_parsing_error"
CategoryResultSet ErrorCategory = "result_set_error"
CategoryUnsupportedOperation ErrorCategory = "unsupported_operation"
CategoryRateLimitExceeded ErrorCategory = "rate_limit_exceeded"
CategorySSLHandshake ErrorCategory = "ssl_handshake_error"
CategoryStatementTimeout ErrorCategory = "statement_execution_timeout"
CategoryExecuteStatement ErrorCategory = "execute_statement_failed"
CategoryStatementCancelled ErrorCategory = "execute_statement_cancelled"
CategorySessionClosed ErrorCategory = "session_closed"
CategoryStatementClosed ErrorCategory = "statement_closed"
)
Loading