{"record":{"id":"5af30cdb1953640d","repo":"flowable/flowable-engine","slug":"e-getmessage","errorCode":null,"errorMessage":"<e.getMessage()>","messagePattern":"<e\\.getMessage\\(\\)>","errorType":"exception","errorClass":"FlowableException","httpStatus":500,"severity":"error","filePath":"modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentCollectionResource.java","lineNumber":231,"sourceCode":"            deploymentBuilder.name(fileName);\n\n            if (tenantId != null) {\n                deploymentBuilder.tenantId(tenantId);\n            }\n\n            if (restApiInterceptor != null) {\n                restApiInterceptor.enhanceDeployment(deploymentBuilder);\n            }\n\n            AppDeployment deployment = deploymentBuilder.deploy();\n\n            return appRestResponseFactory.createAppDeploymentResponse(deployment);\n\n        } catch (Exception e) {\n            if (e instanceof FlowableException) {\n                throw (FlowableException) e;\n            }\n            throw new FlowableException(e.getMessage(), e);\n        }\n    }\n    \n    public Map<String, String> splitQueryString(String queryString) {\n        if (StringUtils.isEmpty(queryString)) {\n            return Collections.emptyMap();\n        }\n        Map<String, String> queryMap = new HashMap<>();\n        for (String param : queryString.split(\"&\")) {\n            queryMap.put(StringUtils.substringBefore(param, \"=\"), decode(StringUtils.substringAfter(param, \"=\")));\n        }\n        return queryMap;\n    }\n    \n    protected String decode(String string) {\n        if (string != null) {\n            return URLDecoder.decode(string, StandardCharsets.UTF_8);\n        }","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDeploymentCollectionResource.java#L213-L249","documentation":"Catch-all in AppDeploymentCollectionResource.uploadDeployment: any exception that is not already a FlowableException is rethrown as a FlowableException whose message is the original exception's message (e.getMessage()). The meaningful detail is usually in the cause and server stack trace, since e.getMessage() can be terse or even null (e.g. from an NPE).","triggerScenarios":"Any non-Flowable failure during deployment build/save: repository save errors, IO problems reading the uploaded file, NPEs from missing query params, resource conversion errors inside the deployment builder.","commonSituations":"DB connection failures during repositoryService.createDeployment().deploy(); invalid .app/zip content rejected by the underlying engine with a non-Flowable exception; NullPointerException whose message is null, producing a confusing empty message.","solutions":["Inspect the server log stack trace for the wrapped cause (getCause()).","Ensure the uploaded file is a valid .app or zip of valid app definitions.","Verify DB connectivity and that deploymentName/tenant query params are present and non-empty.","In client code, catch FlowableException and surface both message and cause."],"exampleFix":"// before\nthrow new FlowableException(e.getMessage(), e); // message may be null\n// after\nString msg = e.getMessage() != null ? e.getMessage() : e.getClass().getSimpleName();\nthrow new FlowableException(\"Deployment failed: \" + msg, e);","handlingStrategy":"try-catch","validationCode":"// Pre-flight checks before deploying\nif (StringUtils.isEmpty(deploymentName)) throw new IllegalArgumentException(\"deploymentName required\");\nif (!file.canRead()) throw new IllegalArgumentException(\"uploaded file unreadable\");","typeGuard":null,"tryCatchPattern":"try {\n    return uploadDeployment(request, tenantId);\n} catch (FlowableException e) {\n    throw e; // server already classified it\n} catch (Exception e) {\n    throw new FlowableException(\"Deployment failed: \" + e, e); // include full exception; message may be null\n}","preventionTips":["Always read the wrapped cause in server logs; the message alone can be null or empty.","Validate uploaded content before deploy (valid .app/zip).","Check DB connectivity — repository save failures surface here.","Include the whole exception chain when reporting."],"tags":["rest","deployment","error-handling","flowable"],"backgroundTag":"api-error-response","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"}