{"record":{"id":"c741aa4cc777bbcc","repo":"flowable/flowable-engine","slug":"no-resource-name-provided-c741aa","errorCode":null,"errorMessage":"No resource name provided","messagePattern":"No resource name provided","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-event-registry-rest/src/main/java/org/flowable/eventregistry/rest/service/api/repository/BaseDeploymentResourceDataResource.java","lineNumber":51,"sourceCode":" */\npublic class BaseDeploymentResourceDataResource {\n\n    @Autowired\n    protected ContentTypeResolver contentTypeResolver;\n\n    @Autowired\n    protected EventRepositoryService repositoryService;\n    \n    @Autowired(required=false)\n    protected EventRegistryRestApiInterceptor 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        EventDeployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + deploymentId + \"'.\", EventDeployment.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)) {\n            String contentType = contentTypeResolver.resolveContentType(resourceName);\n            response.setContentType(contentType);\n            ","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-rest/src/main/java/org/flowable/eventregistry/rest/service/api/repository/BaseDeploymentResourceDataResource.java#L33-L69","documentation":"FlowableIllegalArgumentException thrown by getDeploymentResourceData when the resourceName parameter is null. A deployment id alone is not enough; the API needs the exact resource name to fetch the bytes from the repository.","triggerScenarios":"Calling the resource-data endpoint without the resource name segment, or invoking getDeploymentResourceData(deploymentId, null, response) directly.","commonSituations":"Resource names containing slashes being split incorrectly by URL routing, clients omitting the name after listing resources, or template variables left unsubstituted.","solutions":["Pass the exact resource name returned by the deployment resources listing endpoint.","URL-encode resource names that contain slashes or special characters so routing does not drop them.","Confirm the resource exists with GET /event-registry-repository/deployments/{deploymentId}/resources before fetching its data."],"exampleFix":"// before\nbyte[] data = resource.getResourceData(); // name was null after bad URL parsing\n// after\nString resourceName = \"event-definition.json\";\nbyte[] data = resource.getResourceData(deploymentId, URLEncoder.encode(resourceName, StandardCharsets.UTF_8));","handlingStrategy":"validation","validationCode":"if (resourceName == null || resourceName.isEmpty()) throw new IllegalArgumentException(\"resourceName required\");","typeGuard":"boolean hasResourceName = n != null && !n.trim().isEmpty();","tryCatchPattern":"try { ... } catch (FlowableIllegalArgumentException e) { return ResponseEntity.badRequest().body(e.getMessage()); }","preventionTips":["Take resource names from the deployment resources listing, never hardcoded guesses","URL-encode names with slashes or spaces"],"tags":["rest-api","missing-parameter","resource"],"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:30:33.424Z"}