{"record":{"id":"067fb8e09adddadb","repo":"flowable/flowable-engine","slug":"no-deployment-id-provided-067fb8","errorCode":null,"errorMessage":"No deployment id provided","messagePattern":"No deployment id provided","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/BaseDeploymentResourceDataResource.java","lineNumber":48,"sourceCode":"\n/**\n * @author Frederik Heremans\n */\npublic class BaseDeploymentResourceDataResource {\n\n    @Autowired\n    protected ContentTypeResolver contentTypeResolver;\n\n    @Autowired\n    protected RepositoryService repositoryService;\n    \n    @Autowired(required=false)\n    protected BpmnRestApiInterceptor restApiInterceptor;\n\n    protected byte[] getDeploymentResourceData(String deploymentId, String resourceName, HttpServletResponse response) {\n\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"No deployment id provided\");\n        }\n        if (resourceName == null) {\n            throw new FlowableIllegalArgumentException(\"No resource name provided\");\n        }\n\n        // Check if deployment exists\n        Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + deploymentId + \"'.\", Deployment.class);\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessDeploymentById(deployment);\n        }\n\n        List<String> resourceList = repositoryService.getDeploymentResourceNames(deploymentId);\n\n        if (resourceList.contains(resourceName)) {","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/BaseDeploymentResourceDataResource.java#L30-L66","documentation":"BaseDeploymentResourceDataResource.getDeploymentResourceData first validates that a deploymentId was supplied before looking up the deployment resource content. A null deploymentId yields FlowableIllegalArgumentException. In the REST layer this surfaces as HTTP 400 because the path variable resolved to nothing usable.","triggerScenarios":"Requesting deployment resource data with a null/empty deploymentId (e.g. malformed URL path where {deploymentId} is empty or a misconfigured client sends no id).","commonSituations":"Template variable not substituted in generated URLs; client framework strips empty path segments; calling the protected helper method directly from custom code with a null argument.","solutions":["Ensure the URL includes a valid deployment id: GET /repository/deployments/{deploymentId}/resourcedata/{resourceName}.","Validate deploymentId is non-null/non-empty in the client before calling.","Fix URL-templating code that leaves the placeholder unsubstituted."],"exampleFix":"// before\nclient.get(\"/repository/deployments//resourcedata/process.bpmn\");\n// after\nclient.get(\"/repository/deployments/2501/resourcedata/process.bpmn\");","handlingStrategy":"validation","validationCode":"if (!deploymentId) throw new Error('deploymentId is required');","typeGuard":null,"tryCatchPattern":"try { ... } catch (e) { if (e.status === 400) log.error('Missing deployment id in request'); throw e; }","preventionTips":["Validate path parameters before building REST URLs.","Check URL templates are fully interpolated (no empty segments).","Guard direct calls to getDeploymentResourceData with a null check."],"tags":["rest-api","invalid-argument","missing-parameter","deployment"],"backgroundTag":"missing-required-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T16:17:23.245Z"}