Skip to content

[codex] fix Deno deleteMany transport#204

Open
arosenan wants to merge 1 commit into
base44:mainfrom
arosenan:codex/fix-deno-delete-many-transport
Open

[codex] fix Deno deleteMany transport#204
arosenan wants to merge 1 commit into
base44:mainfrom
arosenan:codex/fix-deno-delete-many-transport

Conversation

@arosenan

Copy link
Copy Markdown

What changed

  • route Deno DELETE requests with a body through Axios's fetch adapter
  • preserve existing adapter selection for browsers, Node, Cloudflare, bodyless deletes, and non-DELETE requests
  • add focused unit coverage for the runtime/method/body selection matrix

Why

entities.<Entity>.deleteMany(query) sends a JSON body with DELETE. In legacy Base44 Deno v1 functions, Axios selects its Node HTTP adapter, which enters Deno's node:http compatibility layer and fails after approximately 15 seconds with Base44Error: connection error.

This is tracked internally as BUG-494 and was reproduced across SDK 0.8.25 and 0.8.31.

Production reproduction

An isolated Deno v1 Base44 app produced this comparison against the same production entity endpoint and query:

Transport Result Time
native Deno fetch HTTP 200, deleted 3 416 ms
Axios default HTTP adapter connection error 15,132 ms
Axios forced fetch adapter HTTP 200, deleted 3 274 ms
Axios HTTP adapter, maxRedirects: 0 connection error 15,106 ms
Axios HTTP adapter, explicit Content-Length connection error 15,164 ms
SDK deleteMany connection error 15,138 ms

The failure stack enters axios/lib/adapters/http.js and Deno node:http. Successful native/fetch-adapter calls produce the platform's entity_entries_deleted_bulk log; failed HTTP-adapter calls never reach the backend API.

The same SDK call succeeds on Base44's Cloudflare Functions runtime, where Axios uses fetch because the Node HTTP adapter is unavailable.

Impact

deleteMany works again in legacy Deno backend functions without changing the public SDK method or backend API contract.

Validation

  • npm run test:unit -- tests/unit/axios-client.test.ts — 157 tests passed
  • npm run build
  • npm run lint
  • git diff --check

@arosenan arosenan marked this pull request as ready for review June 22, 2026 12:24
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.

2 participants