FlowiseAI/Flowise · error · Error

Failed to make PUT request: ${error instanceof Error ? error

Error message

Failed to make PUT request: ${error instanceof Error ? error.message : 'Unknown error'}

What it means

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.

Source

Thrown at packages/components/nodes/tools/RequestsPut/core.ts:143

                'Content-Type': 'application/json',
                ...(params.headers || {}),
                ...this.headers
            }

            const res = await secureFetch(inputUrl, {
                method: 'PUT',
                headers: requestHeaders,
                body: JSON.stringify(inputBody)
            })

            if (!res.ok) {
                throw new Error(`HTTP Error ${res.status}: ${res.statusText}`)
            }

            const text = await res.text()
            return text.slice(0, this.maxOutputLength)
        } catch (error) {
            throw new Error(`Failed to make PUT request: ${error instanceof Error ? error.message : 'Unknown error'}`)
        }
    }
}

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Strip the 'Failed to make PUT request: ' prefix to recover the root cause.
  2. If the cause mentions SSRF/deny-list, use a public URL or have an admin adjust the allow-list.
  3. If the cause is 'HTTP Error <code>', apply the fix for error 487.
  4. For TLS/network causes, verify connectivity and certs from the Flowise host.

Example fix

// before
try { await tool._call({}) } catch (e) { console.error((e as Error).message) }

// after (classify wrapped cause)
try {
  await tool._call({})
} catch (e) {
  const cause = (e as Error).message.replace(/^Failed to make PUT request:\s*/, '')
  if (/HTTP Error 404/.test(cause)) throw new Error('Resource not found; verify URL')
  else if (/HTTP Error (429|5\d\d)/.test(cause)) await retryWithBackoff()
  else throw e
}
Defensive patterns

Strategy: try-catch

Validate before calling

function classifyPutFailure(e: unknown): 'network' | 'ssrf' | 'http' | 'unknown' {
  const msg = e instanceof Error ? e.message : String(e)
  if (/HTTP Error \d{3}/.test(msg)) return 'http'
  if (/redirect|denied|ssrf|resolve|blocked/i.test(msg)) return 'ssrf'
  if (/ECONN|ENOTFOUND|ETIMEDOUT|certificate|fetch failed/i.test(msg)) return 'network'
  return 'unknown'
}

Type guard

const isWrappedPutFailure = (e: unknown): e is Error =>
  e instanceof Error && /^Failed to make PUT request:/.test(e.message)

Try / catch

try { return await tool._call(arg) }
catch (e) {
  const cause = (e as Error).message.replace(/^Failed to make PUT request:\s*/, '')
  if (/HTTP Error 404/.test(cause)) throw new Error('PUT target missing — verify URL')
  if (/HTTP Error (429|5\d\d)/.test(cause)) return await retryWithBackoff(() => tool._call(arg))
  if (/ssrf|denied|redirect/i.test(cause)) throw new Error('Blocked: ' + cause)
  throw e
}

Prevention

When it happens

Trigger: Network/TCP failure, TLS error, SSRF-blocked target, redirect loop, non-ok HTTP status re-wrapped from 487.

Common situations: Host unreachable; URL points to a private IP blocked by SSRF protection; cert issues; the inner HTTP Error (487) being re-wrapped; transient outage.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/ce1ac017ab0e5fbc. Report an issue: GitHub.