{"record":{"id":"09ddd0b6b33702f5","repo":"floci-io/floci","slug":"resourcenotfoundexception-09ddd0","errorCode":"ResourceNotFoundException","errorMessage":"Resource {identifier} of type {typeName} was not found.","messagePattern":"Resource (.+?) of type (.+?) was not found\\.","errorType":"exception","errorClass":"AwsException","httpStatus":404,"severity":"error","filePath":"src/main/java/io/github/hectorvent/floci/services/cloudcontrol/CloudControlService.java","lineNumber":220,"sourceCode":"                    \"Request token \" + requestToken + \" was not found.\", 404);\n        }\n        return event;\n    }\n\n    /** Cloud Control {@code GetResource}: a single resource from the read side, by identifier. */\n    public ResourceDescription getResource(String region, String typeName, String identifier) {\n        for (ResourceDescription d : listResources(region, typeName)) {\n            if (d.identifier().equals(identifier)) {\n                return d;\n            }\n        }\n        // CreateResource provisions the whole CFN type set while the read side lists six types, so\n        // fall back to what the create recorded — otherwise a successful create is unreadable.\n        CreatedResource state = created.get(createdKey(region, typeName, identifier));\n        if (state != null) {\n            return new ResourceDescription(identifier, state.model());\n        }\n        throw new AwsException(\"ResourceNotFoundException\",\n                \"Resource \" + identifier + \" of type \" + typeName + \" was not found.\", 404);\n    }\n\n    /**\n     * Stores a request's latest state, evicting the oldest finished tokens once the map grows past\n     * {@link #MAX_RETAINED_REQUESTS}. In-flight tokens are never evicted — a client still polling\n     * must not get RequestTokenNotFound.\n     */\n    private ProgressEvent record(ProgressEvent event) {\n        if (requests.put(event.requestToken(), event) == null) {\n            requestOrder.add(event.requestToken());\n        }\n        while (requests.size() > MAX_RETAINED_REQUESTS) {\n            String oldest = requestOrder.poll();\n            if (oldest == null) {\n                break;\n            }\n            ProgressEvent existing = requests.get(oldest);","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/floci-io/floci/blob/62ff490619e7bd3554597c28c704081b4c15add5/src/main/java/io/github/hectorvent/floci/services/cloudcontrol/CloudControlService.java#L202-L238","documentation":"Error \"Resource {identifier} of type {typeName} was not found.\" thrown in floci-io/floci.","triggerScenarios":"Thrown at src/main/java/io/github/hectorvent/floci/services/cloudcontrol/CloudControlService.java:220 when the library encounters an invalid state.","commonSituations":"Occurs when operating on a resource identifier that does not exist for the given type. Verify the TypeName and Identifier, or create the resource first.","solutions":["Verify the resource identifier and type name.","Create the resource first, then retry."],"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"}