{"record":{"id":"c1e254056c03624f","repo":"floci-io/floci","slug":"invalidjobstateexception","errorCode":"InvalidJobStateException","errorMessage":"Job has already been acknowledged","messagePattern":"Job has already been acknowledged","errorType":"exception","errorClass":"AwsException","httpStatus":400,"severity":"error","filePath":"src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineService.java","lineNumber":575,"sourceCode":"            if (requested.equals(data.path(\"actionTypeKey\").asText())\n                    && thirdParty == data.path(\"thirdParty\").asBoolean(false)) {\n                jobs.add(data.path(\"job\"));\n            }\n        }\n        ObjectNode response = mapper.createObjectNode();\n        response.set(\"jobs\", jobs);\n        return response;\n    }\n\n    private ObjectNode acknowledgeJob(JsonNode request, String region, String account) {\n        CodePipelineStoredItem job = requireItem(\n                account, region, \"job\", text(request, \"jobId\"), \"JobNotFoundException\");\n        String nonce = text(request, \"nonce\");\n        if (!nonce.equals(job.getData().path(\"nonce\").asText())) {\n            throw new AwsException(\"InvalidNonceException\", \"Invalid job nonce\", 400);\n        }\n        if (!\"Created\".equals(job.getStatus())) {\n            throw new AwsException(\"InvalidJobStateException\", \"Job has already been acknowledged\", 400);\n        }\n        job.setStatus(\"InProgress\");\n        job.setUpdated(now());\n        putItem(job);\n        return mapper.createObjectNode().put(\"status\", \"InProgress\");\n    }\n\n    private ObjectNode getJobDetails(JsonNode request, String region, String account) {\n        CodePipelineStoredItem job = requireItem(\n                account, region, \"job\", text(request, \"jobId\"), \"JobNotFoundException\");\n        return mapper.createObjectNode().set(\"jobDetails\", job.getData().path(\"job\"));\n    }\n\n    private ObjectNode completeJob(JsonNode request, String region, String account, boolean success) {\n        CodePipelineStoredItem job = requireItem(\n                account, region, \"job\", text(request, \"jobId\"), \"JobNotFoundException\");\n        if (!List.of(\"Created\", \"InProgress\").contains(job.getStatus())) {\n            throw new AwsException(\"InvalidJobStateException\", \"Job is already complete\", 400);","sourceCodeStart":557,"sourceCodeEnd":593,"githubUrl":"https://github.com/floci-io/floci/blob/62ff490619e7bd3554597c28c704081b4c15add5/src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineService.java#L557-L593","documentation":"Error \"Job has already been acknowledged\" thrown in floci-io/floci.","triggerScenarios":"Thrown at src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineService.java:575 when the library encounters an invalid state.","commonSituations":"Occurs when AcknowledgeJob is called twice for the same job. Only acknowledge a job once after polling it.","solutions":["Do not acknowledge a job twice; poll for a new job instead."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"62ff490619e7bd3554597c28c704081b4c15add5","analyzedAt":"2026-08-14T14:25:23.764Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}