{"record":{"id":"2c5de561f03d4268","repo":"flowable/flowable-engine","slug":"errorprefix-for-variablecontainer","errorCode":null,"errorMessage":"${errorPrefix} for ${variableContainer}","messagePattern":"\\$\\{errorPrefix\\} for \\$\\{variableContainer\\}","errorType":"validation","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/BaseHttpActivityDelegate.java","lineNumber":273,"sourceCode":"\n        if (request.getUrl() == null) {\n            throw new FlowableException(HTTP_TASK_REQUEST_URL_REQUIRED);\n        }\n    }\n    protected HttpHeaders getRequestHeaders(VariableContainer variableContainer) {\n        return parseRequestHeaders(variableContainer, requestHeaders, HTTP_TASK_REQUEST_HEADERS_INVALID);\n    }\n\n    protected HttpHeaders getRequestSecureHeaders(VariableContainer variableContainer) {\n        return parseRequestHeaders(variableContainer, requestSecureHeaders, HTTP_TASK_REQUEST_SECURE_HEADERS_INVALID);\n    }\n\n    protected HttpHeaders parseRequestHeaders(VariableContainer variableContainer, Expression headers, String errorPrefix) {\n        try {\n            String headersString = ExpressionUtils.getStringFromField(headers, variableContainer);\n            return HttpHeaders.parseFromString(headersString);\n        } catch (FlowableIllegalArgumentException ex) {\n            throw new FlowableException(errorPrefix + \" for \" + variableContainer, ex);\n        }\n    }\n\n    protected abstract void propagateError(VariableContainer container, String code);\n\n    public static class ExecutionData {\n\n        protected RequestData request;\n        protected HttpResponse response;\n        protected Throwable exception;\n\n        public ExecutionData(RequestData request, HttpResponse response) {\n            this(request, response, null);\n        }\n\n        public ExecutionData(RequestData request, HttpResponse response, Throwable exception) {\n            this.request = request;\n            this.response = response;","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/BaseHttpActivityDelegate.java#L255-L291","documentation":"parseRequestHeaders converts a headers Expression into an HttpHeaders object by reading the expression value from the variable container and parsing it. If the header string is malformed, HttpHeaders.parseFromString throws FlowableIllegalArgumentException, which is rethrown as FlowableException with the error prefix (e.g. HTTP_TASK_REQUEST_HEADERS_INVALID) plus the variable container description. The root cause is an unparsable header definition string.","triggerScenarios":"The requestHeaders or secureHeaders expression resolves to a string that HttpHeaders.parseFromString cannot parse — e.g. missing colon separator, blank name, wrong line/separator format — for request headers or secure headers.","commonSituations":"Passing headers via a process variable that contains free-form text; using 'Header-Name Value' without a colon; embedding newlines in the wrong place; typos in header names copied from curl commands.","solutions":["Fix the headers string so each header is 'Name: value' separated by commas or newlines per HttpHeaders.parseFromString rules","Inspect the cause (FlowableIllegalArgumentException) in the stack trace for the exact parse failure position","Print the resolved headers value with an execution listener before the HTTP task to see what the expression evaluates to","Move header construction to a script task that produces a known-good string"],"exampleFix":"// before\nexecution.setVariable(\"myHeaders\", \"Content-Type application/json\");\n// after\nexecution.setVariable(\"myHeaders\", \"Content-Type: application/json\");","handlingStrategy":"validation","validationCode":"String headers = (String) execution.getVariable(\"requestHeaders\");\nif (headers != null && java.util.Arrays.stream(headers.split(\"[\\\\n,]\")).anyMatch(h -> !h.contains(\":\"))) {\n    throw new IllegalArgumentException(\"Each header must be 'Name: value'\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    HttpHeaders.parseFromString(headersString);\n} catch (FlowableIllegalArgumentException ex) {\n    throw new IllegalStateException(\"Malformed header definition: \" + headersString, ex);\n}","preventionTips":["Format headers strictly as 'Name: value' pairs separated by commas or newlines","Log resolved header strings in a test execution before deploying","Keep header definitions as static literals where possible"],"tags":["flowable","http-task","headers","parse-error"],"backgroundTag":"invalid-argument-format","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}