[SEA-NodeJS] (3/8) Kernel ErrorCode → JS error-class mapping (M0 minimum)#377
[SEA-NodeJS] (3/8) Kernel ErrorCode → JS error-class mapping (M0 minimum)#377msrathore-db wants to merge 1 commit into
Conversation
|
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
f7cdb80 to
8ccc8e2
Compare
|
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
20231c8 to
2f1865b
Compare
8ccc8e2 to
c9a8811
Compare
|
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
6b70ce4 to
548a14b
Compare
Single mapping function in lib/sea/SeaErrorMapping.ts converts the napi-binding's surfaced kernel error (code+message+sqlstate) to the appropriate existing JS error class. M0 minimum: PAT auth errors land as AuthenticationError; cancel/timeout as OperationStateError; network/internal as HiveDriverError. SQLSTATE preserved on the error object via .sqlState property. No new error classes. M1 may add nuance. Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
c9a8811 to
3dc4b3c
Compare
Stack
Linear stack of 8 PRs landing the M0 + M1 Phase 1 SEA NodeJS work. Merge in order from base ↑ to tip. The tip branch (
msrathore/sea-auth-u2m, PR #383) is the single snapshot containing everything in flight — point your test or benchmark harness at it for an end-to-end check.sea-abstractionsea-napi-binding.nodeartifactsea-errors-loggingErrorCode→ JS error-class mapping (M0 minimum)sea-authuseSEA: truesea-executionexecuteStatement+openSession(sessionConfig, initialCatalog/Schema)sea-resultssea-operationsea-auth-u2m← TIPCompanion kernel stack (
databricks/databricks-sql-kernel): 8 PRs — root #26 (async-public-api) → #27 → #25 → #29 → #28 → #30 → #24 → #23 (tip).Policy: new PRs always stack on the current tip. No sibling/parallel topology. No force-pushes on existing PRs unless absolutely necessary; if a PR's content is wrong, add a fix-up commit on top of the stack tip rather than rewriting history.
This PR is position 3/8.
Summary
SeaErrorMapping.tsdecodes the kernel's__databricks_error__:<json>napi error envelope into typed JS errors (AuthenticationError,NetworkError,OperationStateError, etc.). M0-minimum mapping covers 13 kernelErrorCodevariants.The decoder gets significantly hardened later in #383 (M1 OAuth) — namespace under
error.kernelMetadata.*, sentinel-strip on corrupted envelopes, type-guards — but the M0 baseline is here.Draft until you give the go for review.
Tracking
Co-authored-by: Isaac