WJW
Convex Community3y ago
9 replies
WJ

retry fetch failed error

is there a simple flag to have ConvexHttpClient retry what seems to be a connection timeout error?

node:internal/deps/undici/undici:11730
    Error.captureStackTrace(err, this);
          ^
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11730:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at process.processImmediate (node:internal/timers:449:9)
    at async ConvexHttpClient.action (/home/node/app/node_modules/convex/dist/cjs/browser/http_client.js:228:22) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (node:internal/deps/undici/undici:6869:28)
      at node:internal/deps/undici/undici:6825:50
      at Immediate._onImmediate (node:internal/deps/undici/undici:6857:13)
      at process.processImmediate (node:internal/timers:478:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
}


It seems some mutations were dropped when this error occurred.

This came up while I was performance testing, I haven't seen in production.
Was this page helpful?