{"record":{"id":"ce1ac017ab0e5fbc","repo":"FlowiseAI/Flowise","slug":"failed-to-make-put-request-error-instanceof-err","errorCode":null,"errorMessage":"Failed to make PUT request: ${error instanceof Error ? error.message : 'Unknown error'}","messagePattern":"Failed to make PUT request: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/RequestsPut/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: 'PUT',\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 PUT 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/RequestsPut/core.ts#L125-L147","documentation":"Outer catch-all of RequestsPut_Core._call. Wraps every failure from secureFetch — network errors, SSRF deny-list blocks, redirect overflow, and the inner HTTP Error (487) — into 'Failed to make PUT request: <cause>'. This is the error callers actually observe; 487 never propagates unwrapped.","triggerScenarios":"Network/TCP failure, TLS error, SSRF-blocked target, redirect loop, non-ok HTTP status re-wrapped from 487.","commonSituations":"Host unreachable; URL points to a private IP blocked by SSRF protection; cert issues; the inner HTTP Error (487) being re-wrapped; transient outage.","solutions":["Strip the 'Failed to make PUT request: ' prefix to recover the root cause.","If the cause mentions SSRF/deny-list, use a public URL or have an admin adjust the allow-list.","If the cause is 'HTTP Error <code>', apply the fix for error 487.","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 PUT request:\\s*/, '')\n  if (/HTTP Error 404/.test(cause)) throw new Error('Resource not found; verify URL')\n  else if (/HTTP Error (429|5\\d\\d)/.test(cause)) await retryWithBackoff()\n  else throw e\n}","handlingStrategy":"try-catch","validationCode":"function classifyPutFailure(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 isWrappedPutFailure = (e: unknown): e is Error =>\n  e instanceof Error && /^Failed to make PUT request:/.test(e.message)","tryCatchPattern":"try { return await tool._call(arg) }\ncatch (e) {\n  const cause = (e as Error).message.replace(/^Failed to make PUT request:\\s*/, '')\n  if (/HTTP Error 404/.test(cause)) throw new Error('PUT target missing — verify URL')\n  if (/HTTP Error (429|5\\d\\d)/.test(cause)) return await retryWithBackoff(() => tool._call(arg))\n  if (/ssrf|denied|redirect/i.test(cause)) throw new Error('Blocked: ' + cause)\n  throw e\n}","preventionTips":["Parse the suffix after 'Failed to make PUT request: ' to recover the cause.","PUT is idempotent — safe to retry on transient errors.","Resolve 404/conflict before retrying rather than blind-retrying."],"tags":["http","network","error-wrapping","ssrf","put"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}