{"record":{"id":"5821869f56454cb7","repo":"floci-io/floci","slug":"invalidrequestexception-582186","errorCode":"InvalidRequestException","errorMessage":"{} is required.","messagePattern":"(.+?) is required\\.","errorType":"error_code","errorClass":"AwsException","httpStatus":400,"severity":"error","filePath":"src/main/java/io/github/hectorvent/floci/services/cloudcontrol/CloudControlJsonHandler.java","lineNumber":76,"sourceCode":"        pe.put(\"Operation\", event.operation());\n        pe.put(\"OperationStatus\", event.operationStatus());\n        if (event.statusMessage() != null) {\n            pe.put(\"StatusMessage\", event.statusMessage());\n        }\n        if (event.resourceModel() != null) {\n            pe.put(\"ResourceModel\", event.resourceModel());\n        }\n        return Response.ok(response).build();\n    }\n\n    /**\n     * InvalidRequestException is the code Cloud Control declares for a malformed request, so it is\n     * what an SDK maps onto a typed exception. ValidationException is not in the service model.\n     */\n    private String required(JsonNode request, String field) {\n        String value = request.path(field).asText(null);\n        if (value == null || value.isBlank()) {\n            throw new AwsException(\"InvalidRequestException\", field + \" is required.\", 400);\n        }\n        return value;\n    }\n\n    /**\n     * GetResourceRequestStatus declares only RequestTokenNotFoundException, so an absent token\n     * reports that rather than the InvalidRequestException the other operations declare.\n     */\n    private String requestToken(JsonNode request) {\n        String value = request.path(\"RequestToken\").asText(null);\n        if (value == null || value.isBlank()) {\n            throw new AwsException(\"RequestTokenNotFoundException\", \"RequestToken is required.\", 404);\n        }\n        return value;\n    }\n\n    private Response listResources(JsonNode request, String region) {\n        String typeName = required(request, \"TypeName\");","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/floci-io/floci/blob/62ff490619e7bd3554597c28c704081b4c15add5/src/main/java/io/github/hectorvent/floci/services/cloudcontrol/CloudControlJsonHandler.java#L58-L94","documentation":"Error \"{} is required.\" thrown in floci-io/floci.","triggerScenarios":"Thrown at src/main/java/io/github/hectorvent/floci/services/cloudcontrol/CloudControlJsonHandler.java:76 when the library encounters an invalid state.","commonSituations":"Occurs when a required field is missing from a CloudControl request payload. Include the named field in the JSON body.","solutions":["Include the required parameter in the request payload."],"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"}