{"record":{"id":"17aba2c749a944f9","repo":"floci-io/floci","slug":"validationexception","errorCode":"ValidationException","errorMessage":"Reserved tag keys with prefix floci: can only be supplied during resource creation.","messagePattern":"Reserved tag keys with prefix floci: can only be supplied during resource creation\\.","errorType":"http","errorClass":"AwsException","httpStatus":400,"severity":"error","filePath":"src/main/java/io/github/hectorvent/floci/core/common/ReservedTags.java","lineNumber":113,"sourceCode":"        }\n        for (String key : tags.keySet()) {\n            if (isReserved(key) || DEPRECATED_API_GATEWAY_CUSTOM_ID_KEY.equals(key)) {\n                throw new AwsException(\n                        BAD_REQUEST_EXCEPTION,\n                        \"Reserved tag key \" + key + \" can only be supplied during resource creation.\",\n                        400\n                );\n            }\n        }\n    }\n\n    public static void rejectReservedTagsOnUpdate(Map<String, String> tags) {\n        if (tags == null) {\n            return;\n        }\n        for (String key : tags.keySet()) {\n            if (isReserved(key)) {\n                throw new AwsException(\n                        VALIDATION_EXCEPTION,\n                        \"Reserved tag keys with prefix \" + RESERVED_PREFIX + \" can only be supplied during resource creation.\",\n                        400\n                );\n            }\n        }\n    }\n\n    public static void rejectUnknownReservedTags(Map<String, String> tags, String errorCode) {\n        if (tags == null) {\n            return;\n        }\n        for (String key : tags.keySet()) {\n            if (isReserved(key) && !key.equals(OVERRIDE_ID_KEY) && !key.equals(OVERRIDE_COGNITO_CLIENT_ID_KEY) && !key.equals(OVERRIDE_COGNITO_CLIENT_SECRET_KEY)) {\n                    throw new AwsException(\n                            errorCode,\n                            \"%s is an unknown Reserved Tag.\".formatted(key),\n                            400","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/floci-io/floci/blob/62ff490619e7bd3554597c28c704081b4c15add5/src/main/java/io/github/hectorvent/floci/core/common/ReservedTags.java#L95-L131","documentation":"Thrown by PutWebhook when the webhook object in the request has no name or a blank name. The webhook name is the primary identifier: it becomes the storage key, the URL path segment, and the ARN suffix, so the emulator rejects the request before creating any of those. It maps to AWS's WebhookName validation.","triggerScenarios":"Calling PutWebhook with an empty webhook object; webhook.name set to \"\" or whitespace; building the request from a template where the name placeholder was never filled.","commonSituations":"Infrastructure code that generates webhook names from an unset variable; CI pipelines passing an empty environment variable into the webhook definition; SDK builders that permit null names client-side.","solutions":["Set webhook.name to a non-blank value matching AWS constraints (letters, numbers, and hyphens, max 100 chars typical)","Validate the name is non-empty in your IaC/template before issuing PutWebhook","Check the value was interpolated correctly when templating the request payload"],"exampleFix":"// before\nclient.putWebhook(r -> r.webhook(w -> w.definition(d -> d.name(webhookName)))); // webhookName empty\n\n// after\nif (webhookName == null || webhookName.isBlank()) throw new IllegalArgumentException(\"webhookName required\");\nclient.putWebhook(r -> r.webhook(w -> w.definition(d -> d.name(webhookName))));","handlingStrategy":"validation","validationCode":"String name = webhookName;\nif (name == null || name.isBlank() || !name.matches(\"[A-Za-z0-9.-]+\")) {\n    throw new IllegalArgumentException(\"webhook name invalid: \" + name);\n}\nclient.putWebhook(r -> r.webhook(w -> w.definition(d -> d.name(name))));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate required webhook fields in your provisioning script before calling the API","Fail template rendering early when the webhook name variable is empty"],"tags":["codepipeline","putwebhook","validation","required-field"],"backgroundTag":null,"analyzedSha":"62ff490619e7bd3554597c28c704081b4c15add5","analyzedAt":"2026-08-14T14:25:23.764Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}