Skip to content

Expose Databricks error codes on ApiError.errorCode - #322

Open
parthban-db wants to merge 1 commit into
mainfrom
parthban-db/stack/sdk-js-fix-2
Open

parthban-db wants to merge 1 commit into
mainfrom
parthban-db/stack/sdk-js-fix-2

Conversation

@parthban-db

@parthban-db parthban-db commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🥞 Stacked PR

Use this link to review incremental changes.


Summary

Adds ApiError.errorCode while retaining the existing ApiError.code property, so consumers can read Databricks API error codes using the cross-SDK property name without breaking current modular-SDK callers.

Why

The modular SDK correctly parses error_code values but exposes them only as ApiError.code. AppKit and other Databricks SDK integrations expect errorCode; this mismatch prevented capability-rejection handling from recognizing INVALID_PARAMETER_VALUE and NOT_IMPLEMENTED, so the SQL Arrow fallback between INLINE and EXTERNAL_LINKS did not run.

What changed

Interface changes

  • Add the readonly ApiError.errorCode: Code property. The existing ApiError.code property remains unchanged.

Behavioral changes

  • Initialize errorCode and code with the same parsed Databricks error code, including product-specific values not declared as named Code members.

Internal changes

  • Extend the existing table-driven tests to verify both properties for constructed and HTTP-derived errors.
  • Record the compatibility fix in the core package changelog.

How is this tested?

npm run format, npm run build, npm run lint, npm run typecheck, and npm test pass across the SDK workspace. The changed core package also passes all 210 browser tests against the system-installed Chrome.

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