FlowiseAI/Flowise · error · Error

URL is required for PUT request

Error message

URL is required for PUT request

What it means

Thrown by RequestsPut_Core._call when this.url is falsy at invocation time. The PUT tool requires a target URL before building the request body and headers. Structurally identical to the GET (480) and POST (483) guards.

Source

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

            method: 'PUT',
            headers: args?.headers || {}
        }
        super(toolInput)
        this.url = args?.url ?? this.url
        this.headers = args?.headers ?? this.headers
        this.body = args?.body ?? this.body
        this.maxOutputLength = args?.maxOutputLength ?? this.maxOutputLength
        this.bodySchema = args?.bodySchema
    }

    /** @ignore */
    async _call(arg: any): Promise<string> {
        const params = { ...arg }

        try {
            const inputUrl = this.url
            if (!inputUrl) {
                throw new Error('URL is required for PUT request')
            }

            let inputBody = {
                ...this.body
            }

            if (this.bodySchema && params.body && Object.keys(params.body).length > 0) {
                inputBody = {
                    ...inputBody,
                    ...params.body
                }
            }

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

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Provide `url` at construction: `new RequestsPut_Core({ url: 'https://...' })`.
  2. Verify the Flowise RequestsPut node has a non-empty URL and bound variables resolve.
  3. Pre-validate at the orchestration layer; skip when no URL is set.

Example fix

// before
const tool = new RequestsPut_Core({ body: { x: 1 } } as any)
await tool._call({}) // throws: URL is required for PUT request

// after
const tool = new RequestsPut_Core({ url: 'https://api.example.com/items/1', body: { x: 1 } } as any)
await tool._call({})
Defensive patterns

Strategy: validation

Validate before calling

function assertPutToolReady(tool: any) {
  if (!tool.url || !/^https?:\/\//.test(tool.url)) throw new Error('RequestsPut requires a valid http(s) url')
}
assertPutToolReady(tool)
await tool._call({})

Type guard

const hasValidPutUrl = (t: any): t is { url: string } =>
  typeof t?.url === 'string' && /^https?:\/\//.test(t.url)

Try / catch

try {
  assertPutToolReady(tool)
  return await tool._call({})
} catch (e) {
  if (/URL is required/.test((e as Error).message)) throw new Error('RequestsPut not configured: set the URL')
  throw e
}

Prevention

When it happens

Trigger: Tool constructed without a `url` field; flow variable bound to URL resolves empty; programmatic instantiation with empty options.

Common situations: RequestsPut node in the canvas has a blank URL; the resource URL template did not resolve; env var supplying the URL is unset.

Related errors


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