Skip to content

fix(mixpanel): expose HTTP status on response errors - #294

Open
flcrom wants to merge 1 commit into
mixpanel:masterfrom
flcrom:fix/229-http-error-status
Open

flcrom wants to merge 1 commit into
mixpanel:masterfrom
flcrom:fix/229-http-error-status

Conversation

@flcrom

@flcrom flcrom commented Oct 3, 2026

Copy link
Copy Markdown

Fixes #229.

Expose the response's HTTP status as an optional statusCode on SDK-created errors so callers can choose whether to retry. Keep the existing messages, Error inheritance and success handling. Transport errors are passed through unchanged; this does not add automatic retries.

Adds runtime regressions for plain and verbose response errors, plus callback and batch callback type checks. The seven new status assertions fail on master and pass with this change.

Checked on Node 22, 24 and 26: format, lint, full tests/type checks (496 SDK tests and 56 provider tests), and build. Tests use local mocks, with no service credentials or external requests.

@flcrom
flcrom requested review from a team and efahk October 3, 2026 02:30

This branch has not been deployed

No deployments
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.

Exposing http statusCode to the error object

1 participant