{"record":{"id":"f7e65c138fda774f","repo":"FlowiseAI/Flowise","slug":"failed-to-make-delete-request-error-instanceof","errorCode":null,"errorMessage":"Failed to make DELETE request: ${error instanceof Error ? error.message : 'Unknown error'}","messagePattern":"Failed to make DELETE request: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/RequestsDelete/core.ts","lineNumber":182,"sourceCode":"                url.searchParams.append(key, String(value))\n            })\n            finalUrl = url.toString()\n        }\n\n        try {\n            const res = await secureFetch(finalUrl, {\n                method: 'DELETE',\n                headers: requestHeaders\n            })\n\n            if (!res.ok) {\n                throw new Error(`HTTP Error ${res.status}: ${res.statusText}`)\n            }\n\n            const text = await res.text()\n            return text.slice(0, this.maxOutputLength)\n        } catch (error) {\n            throw new Error(`Failed to make DELETE request: ${error instanceof Error ? error.message : 'Unknown error'}`)\n        }\n    }\n}\n","sourceCodeStart":164,"sourceCodeEnd":186,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/RequestsDelete/core.ts#L164-L186","documentation":"Thrown by RequestsDelete tool's _call inside its catch block, wrapping any error that escaped the inner try (including the explicit HTTP Error throw, or a secureFetch/network failure). The message extracts the underlying Error.message, falling back to 'Unknown error' for non-Error throws. Because the HTTP Error from error 478 is re-thrown here, this is the outermost error a caller sees for any DELETE failure.","triggerScenarios":"A network failure (DNS, connection refused, TLS error, timeout) from secureFetch; the inner 'HTTP Error ...' throw being caught and re-wrapped; a non-Error exception (rare) thrown inside the try.","commonSituations":"Offline or restricted network egress; misconfigured proxy; invalid URL causing a fetch TypeError; TLS certificate problems; the wrapping obscures the original status code from error 478 when network-level failures occur.","solutions":["Read the wrapped message: if it starts with 'HTTP Error', treat as a status-code problem (see error 478 fixes); otherwise treat as a network/connectivity problem.","For network errors, verify DNS, connectivity, proxy settings, and the URL scheme.","Reconfigure secureFetch/httpSecurity allowlists if the target host is blocked.","For TLS errors, validate the certificate and CA chain on the target host."],"exampleFix":"// before: opaque failure\ntry { await tool._call({}) } catch (e) { console.log(e.message) }\n// after: distinguish network vs HTTP\ntry {\n  await tool._call({})\n} catch (e) {\n  if (e.message.startsWith('HTTP Error')) {\n    // server-side status code problem\n  } else {\n    // network / connectivity problem\n  }\n}","handlingStrategy":"retry","validationCode":"function isRetryableNetworkError(message: string): boolean {\n  if (message.startsWith('HTTP Error')) {\n    const m = message.match(/HTTP Error (\\d+)/)\n    const s = m ? Number(m[1]) : 0\n    return s === 429 || s >= 500\n  }\n  return true // pure network/TLS failure is typically transient\n}","typeGuard":"null","tryCatchPattern":"async function deleteWithRetry(tool: any, arg: any, retries = 3) {\n  for (let i = 0; i <= retries; i++) {\n    try {\n      return await tool.call(arg)\n    } catch (e) {\n      const msg = e instanceof Error ? e.message : ''\n      const isHttp = msg.startsWith('HTTP Error')\n      if (i === retries) throw e\n      if (isHttp && !isRetryableNetworkError(msg)) throw e // 4xx non-retryable\n      await new Promise(r => setTimeout(r, 2 ** i * 500))\n    }\n  }\n}","preventionTips":["Differentiate HTTP-status failures from network failures by inspecting the message prefix.","Retry only idempotent deletes on transient 5xx/429 or network errors.","Validate the URL scheme/host to avoid fetch TypeErrors.","Confirm proxy/egress allowlist includes the target host."],"tags":["http","network","wrapper","connectivity"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}