Skip to content

feat(v3.3.0): add optional native fetch transport and redact REST network errors - #193

Open
JJ-Cro wants to merge 2 commits into
sieblyio:masterfrom
JJ-Cro:update30112026
Open

JJ-Cro wants to merge 2 commits into
sieblyio:masterfrom
JJ-Cro:update30112026

Conversation

@JJ-Cro

@JJ-Cro JJ-Cro commented Dec 1, 2026

Copy link
Copy Markdown
Member

Summary
Adds an optional native fetch transport for REST (e.g. edge runtimes such as Cloudflare Workers) and redacts credentials from REST network errors. Default behaviour stays on axios.

Changelog
Optional native fetch transport: new customFetch REST client option (with exported CustomFetch, CustomFetchRequestInit and CustomFetchResponse types). When set, REST requests go through that fetch function (e.g. fetch or a Cloudflare Workers fetcher) instead of axios, with the same signing, URL/query serialisation, response handling and error shapes (HTTP 200 with code other than "00000" and HTTP 4xx/5xx errors match axios); errors thrown by the fetch function come back unchanged. Default stays axios. README section "Edge runtimes / native fetch (optional)" (automation-tracker #124)
customFetch mode rejects binary, multipart and stream request bodies (Buffer, Blob, FormData, ArrayBuffer/typed arrays, streams, including nested values) locally before signing; use the default axios transport for those inputs (automation-tracker #124)
customFetch mode sends Accept: application/json, text/plain, / (unless you set one), matching axios. README notes that runtime transport headers such as User-Agent and Accept-Encoding can differ between axios and fetch (automation-tracker #124)
REST network errors without a response (e.g. ECONNREFUSED, timeouts) now throw a sanitized Error (same message, code, name, plus whitelisted diagnostic requestOptions) instead of the raw axios error, so they no longer carry the API key, secret, passphrase or signature. Exchange error responses (e.g. code other than "00000") and other non-axios errors are rethrown unchanged (automation-tracker #66)
Version 3.3.0
Checks
npm run lint, npm run build: pass. tsc --noEmit -p tsconfig.json reports the same 10 errors in test/ws.util.ts as on master (no new errors)
Endpoint docs and llms.txt regenerated with the regex runner
Fixes automation-tracker: #124, #66

JJ-Cro and others added 2 commits December 1, 2026 13:56
…work errors

- Add customFetch transport and exported types, binary rejection before signing, default Accept header, and README guidance (automation-tracker sieblyio#124)
- Redact axios REST network errors with a narrow guard and whitelisted diagnostics while preserving HTTP errors (automation-tracker sieblyio#66)
- Version 3.3.0

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.

1 participant