Skip to content

[SEA-NodeJS] (3/9) Kernel ErrorCode → JS error-class mapping (M0 minimum)#377

Draft
msrathore-db wants to merge 1 commit into
mainfrom
msrathore/sea-errors-logging
Draft

[SEA-NodeJS] (3/9) Kernel ErrorCode → JS error-class mapping (M0 minimum)#377
msrathore-db wants to merge 1 commit into
mainfrom
msrathore/sea-errors-logging

Conversation

@msrathore-db
Copy link
Copy Markdown
Contributor

Summary

`SeaErrorMapping.ts` decodes the kernel's `databricks_error:` napi error envelope into typed JS errors (`AuthenticationError`, `NetworkError`, `OperationStateError`, etc.). M0-minimum mapping covers 13 kernel `ErrorCode` variants.

Stack position

PR 3/9. The decoder gets significantly hardened in PR 9/9 (auth-u2m) — namespace under `error.kernelMetadata.*`, sentinel-strip on corrupted envelopes, etc. — but the M0 baseline is here.

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.
@msrathore-db msrathore-db deployed to azure-prod May 16, 2026 12:16 — with GitHub Actions Active
@github-actions
Copy link
Copy Markdown

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 (git rebase -i main).

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