{"record":{"id":"c448050e381446d3","repo":"flowable/flowable-engine","slug":"unsupported-multipart-mode-mode-supported-val","errorCode":null,"errorMessage":"Unsupported multipart mode: ${mode}. Supported values are: STRICT, BROWSER_COMPATIBLE","messagePattern":"Unsupported multipart mode: (.+?)\\. Supported values are: STRICT, BROWSER_COMPATIBLE","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/apache/ApacheHttpComponentsFlowableHttpClient.java","lineNumber":176,"sourceCode":"    }\n\n    public ApacheHttpComponentsFlowableHttpClient(HttpClientBuilder clientBuilder, int socketTimeout, int connectTimeout,\n            int connectionRequestTimeout) {\n        this.clientBuilder = clientBuilder;\n        this.multipartMode = HttpMultipartMode.STRICT;\n        this.socketTimeout = socketTimeout;\n        this.connectTimeout = connectTimeout;\n        this.connectionRequestTimeout = connectionRequestTimeout;\n    }\n\n    protected static HttpMultipartMode resolveMultipartMode(String mode) {\n        if (mode == null) {\n            return HttpMultipartMode.STRICT;\n        }\n        return switch (mode.toUpperCase()) {\n            case \"BROWSER_COMPATIBLE\" -> HttpMultipartMode.BROWSER_COMPATIBLE;\n            case \"STRICT\" -> HttpMultipartMode.STRICT;\n            default -> throw new FlowableIllegalArgumentException(\"Unsupported multipart mode: \" + mode\n                    + \". Supported values are: STRICT, BROWSER_COMPATIBLE\");\n        };\n    }\n\n    @Override\n    public ExecutableHttpRequest prepareRequest(HttpRequest requestInfo) {\n        try {\n            HttpRequestBase request;\n            URI uri = createUri(requestInfo.getUrl());\n            switch (requestInfo.getMethod()) {\n                case \"GET\": {\n                    request = new HttpGet(uri);\n                    break;\n                }\n                case \"POST\": {\n                    HttpPost post = new HttpPost(uri);\n                    setRequestEntity(requestInfo, post);\n                    request = post;","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/apache/ApacheHttpComponentsFlowableHttpClient.java#L158-L194","documentation":"ApacheHttpComponentsFlowableHttpClient.resolveMultipartMode maps the configured multipartMode string to Apache's HttpMultipartMode enum. Null defaults to STRICT; only 'STRICT' and 'BROWSER_COMPATIBLE' are accepted, and any other value throws FlowableIllegalArgumentException listing the supported values.","triggerScenarios":"Setting httpClientConfig.setMultipartMode(...) (or the equivalent HTTP task config) to a string like 'RFC6532', 'lenient', or a misspelled value that is not STRICT or BROWSER_COMPATIBLE (case-insensitive).","commonSituations":"Copying multipart mode names from Apache HttpComponents docs (e.g. RFC6532) that Flowable does not expose; typos like 'browser-compatible'; configuring via properties files with wrong casing that also includes stray whitespace is not the issue here since it is trimmed by uppercase only — the value text itself must match.","solutions":["Change the multipartMode value to STRICT or BROWSER_COMPATIBLE","Remove the multipartMode setting to get the STRICT default (when value is null)","If 'RFC6532' behavior is needed, patch/configure at the Apache client level instead of through this config"],"exampleFix":"// before\nconfig.setMultipartMode(\"RFC6532\");\n// after\nconfig.setMultipartMode(\"BROWSER_COMPATIBLE\");","handlingStrategy":"validation","validationCode":"String mode = config.getMultipartMode();\nif (mode != null && !(mode.equalsIgnoreCase(\"STRICT\") || mode.equalsIgnoreCase(\"BROWSER_COMPATIBLE\"))) {\n    throw new IllegalArgumentException(\"multipartMode must be STRICT or BROWSER_COMPATIBLE\");\n}","typeGuard":"boolean isSupportedMultipartMode(String m) { return m == null || m.equalsIgnoreCase(\"STRICT\") || m.equalsIgnoreCase(\"BROWSER_COMPATIBLE\"); }","tryCatchPattern":null,"preventionTips":["Only use the documented enum names STRICT and BROWSER_COMPATIBLE","Leave multipartMode unset to get the STRICT default","Validate configuration values in a startup bean"],"tags":["flowable","multipart","enum","configuration"],"backgroundTag":"invalid-enum-value","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}