{"record":{"id":"02c382e498981289","repo":"FlowiseAI/Flowise","slug":"failed-to-make-post-request-error-instanceof-er","errorCode":null,"errorMessage":"Failed to make POST request: ${error instanceof Error ? error.message : 'Unknown error'}","messagePattern":"Failed to make POST request: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/RequestsPost/core.ts","lineNumber":143,"sourceCode":"                'Content-Type': 'application/json',\n                ...(params.headers || {}),\n                ...this.headers\n            }\n\n            const res = await secureFetch(inputUrl, {\n                method: 'POST',\n                headers: requestHeaders,\n                body: JSON.stringify(inputBody)\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 POST request: ${error instanceof Error ? error.message : 'Unknown error'}`)\n        }\n    }\n}\n","sourceCodeStart":125,"sourceCodeEnd":147,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/RequestsPost/core.ts#L125-L147","documentation":"Outer catch-all of RequestsPost_Core._call. Wraps every failure from secureFetch — network errors, SSRF deny-list blocks, redirect overflow, and the inner HTTP Error (484) — into 'Failed to make POST request: <cause>'. This is the error callers actually observe.","triggerScenarios":"Network/TCP failure, TLS error, SSRF-blocked target, redirect loop, non-ok HTTP status re-wrapped from 484, body serialization edge cases.","commonSituations":"Target host unreachable; URL points to a private IP blocked by SSRF protection; expired/self-signed cert; the inner HTTP Error (484) being re-wrapped; transient infra outage.","solutions":["Strip the 'Failed to make POST request: ' prefix to recover the root cause.","If the cause mentions SSRF/deny-list, switch to a public URL or have an admin adjust allow-list.","If the cause is 'HTTP Error <code>', apply the fix for error 484.","For TLS/network causes, verify connectivity and certs from the Flowise host."],"exampleFix":"// before\ntry { await tool._call({}) } catch (e) { console.error((e as Error).message) }\n\n// after (classify wrapped cause)\ntry {\n  await tool._call({})\n} catch (e) {\n  const cause = (e as Error).message.replace(/^Failed to make POST request:\\s*/, '')\n  if (/HTTP Error (429|5\\d\\d)/.test(cause)) await retryWithBackoff()\n  else throw e\n}","handlingStrategy":"try-catch","validationCode":"function classifyPostFailure(e: unknown): 'network' | 'ssrf' | 'http' | 'unknown' {\n  const msg = e instanceof Error ? e.message : String(e)\n  if (/HTTP Error \\d{3}/.test(msg)) return 'http'\n  if (/redirect|denied|ssrf|resolve|blocked/i.test(msg)) return 'ssrf'\n  if (/ECONN|ENOTFOUND|ETIMEDOUT|certificate|fetch failed/i.test(msg)) return 'network'\n  return 'unknown'\n}","typeGuard":"const isWrappedPostFailure = (e: unknown): e is Error =>\n  e instanceof Error && /^Failed to make POST request:/.test(e.message)","tryCatchPattern":"try { return await tool._call(arg) }\ncatch (e) {\n  const cause = (e as Error).message.replace(/^Failed to make POST request:\\s*/, '')\n  if (/HTTP Error 4\\d\\d/.test(cause) && !/429/.test(cause)) throw new Error('Permanent POST failure: ' + cause)\n  if (/HTTP Error (429|5\\d\\d)/.test(cause)) return await retryWithBackoff(() => tool._call(arg))\n  throw e\n}","preventionTips":["Parse the suffix after 'Failed to make POST request: ' to recover the cause.","Don't retry POST blindly on client errors (4xx) — risk of duplicate writes.","Use an idempotency key when retrying POST against a non-idempotent endpoint."],"tags":["http","network","error-wrapping","ssrf","post"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}