{"record":{"id":"a3f072c017255ab1","repo":"FlowiseAI/Flowise","slug":"url-is-required-for-put-request","errorCode":null,"errorMessage":"URL is required for PUT request","messagePattern":"URL is required for PUT request","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/RequestsPut/core.ts","lineNumber":110,"sourceCode":"            method: 'PUT',\n            headers: args?.headers || {}\n        }\n        super(toolInput)\n        this.url = args?.url ?? this.url\n        this.headers = args?.headers ?? this.headers\n        this.body = args?.body ?? this.body\n        this.maxOutputLength = args?.maxOutputLength ?? this.maxOutputLength\n        this.bodySchema = args?.bodySchema\n    }\n\n    /** @ignore */\n    async _call(arg: any): Promise<string> {\n        const params = { ...arg }\n\n        try {\n            const inputUrl = this.url\n            if (!inputUrl) {\n                throw new Error('URL is required for PUT request')\n            }\n\n            let inputBody = {\n                ...this.body\n            }\n\n            if (this.bodySchema && params.body && Object.keys(params.body).length > 0) {\n                inputBody = {\n                    ...inputBody,\n                    ...params.body\n                }\n            }\n\n            const requestHeaders = {\n                'Content-Type': 'application/json',\n                ...(params.headers || {}),\n                ...this.headers\n            }","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/RequestsPut/core.ts#L92-L128","documentation":"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.","triggerScenarios":"Tool constructed without a `url` field; flow variable bound to URL resolves empty; programmatic instantiation with empty options.","commonSituations":"RequestsPut node in the canvas has a blank URL; the resource URL template did not resolve; env var supplying the URL is unset.","solutions":["Provide `url` at construction: `new RequestsPut_Core({ url: 'https://...' })`.","Verify the Flowise RequestsPut node has a non-empty URL and bound variables resolve.","Pre-validate at the orchestration layer; skip when no URL is set."],"exampleFix":"// before\nconst tool = new RequestsPut_Core({ body: { x: 1 } } as any)\nawait tool._call({}) // throws: URL is required for PUT request\n\n// after\nconst tool = new RequestsPut_Core({ url: 'https://api.example.com/items/1', body: { x: 1 } } as any)\nawait tool._call({})","handlingStrategy":"validation","validationCode":"function assertPutToolReady(tool: any) {\n  if (!tool.url || !/^https?:\\/\\//.test(tool.url)) throw new Error('RequestsPut requires a valid http(s) url')\n}\nassertPutToolReady(tool)\nawait tool._call({})","typeGuard":"const hasValidPutUrl = (t: any): t is { url: string } =>\n  typeof t?.url === 'string' && /^https?:\\/\\//.test(t.url)","tryCatchPattern":"try {\n  assertPutToolReady(tool)\n  return await tool._call({})\n} catch (e) {\n  if (/URL is required/.test((e as Error).message)) throw new Error('RequestsPut not configured: set the URL')\n  throw e\n}","preventionTips":["Require URL in a typed factory.","PUT is idempotent — safe to retry, but still validate URL first.","Mark URL field required in the Flowise node."],"tags":["http","put","configuration","validation"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}