Skip to content

Improve SEA connection-failure error messages#1560

Open
sreekanth-db wants to merge 1 commit into
databricks:mainfrom
sreekanth-db:fix/sea-connection-error-message
Open

Improve SEA connection-failure error messages#1560
sreekanth-db wants to merge 1 commit into
databricks:mainfrom
sreekanth-db:fix/sea-connection-error-message

Conversation

@sreekanth-db

Copy link
Copy Markdown
Collaborator

Description

SEA connection failures (bad token, missing credential, non-existent warehouse, etc.) surfaced only a generic Error while establishing a connection in databricks in getMessage(). The SDK already provides actionable detail (Invalid access token, HTTP status, etc.) but buildErrorMessage() discarded it. Thrift already propagates server text into the message; this aligns SEA for HTTP API failures.

  • Append DatabricksError message and (HTTP status) in buildErrorMessage() fallback
  • SSL certificate-path branch unchanged; exception type, SQLState, and cause chain unchanged
  • Unknown-host failures are unchanged (different DatabricksException path)

Testing

  • mvn test -pl jdbc-core -Dtest=DatabricksSdkClientTest#testCreateSessionWithNonSSLError,DatabricksSdkClientTest#testCreateSessionWithSSLCertificatePathError
  • Live repro: bad token, blank token, non-existent warehouse — server detail now in getMessage()
  • isaac review --uncommitted — APPROVE (0 actionable findings)

Additional Notes to the Reviewer

Scope is intentionally minimal: one fallback return in buildErrorMessage(). No change to unknown-host handling (DatabricksException bypasses this path).

Include SDK error detail and HTTP status in buildErrorMessage so users
see the server reason in getMessage(), not only in the nested cause.

Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant