{"record":{"id":"94c49c8e03330fe3","repo":"quarkusio/quarkus","slug":"the-specified-attribute-name-attributename-is","errorCode":null,"errorMessage":"The specified attribute name \"${attributeName}\" is not specified in version v1.","messagePattern":"The specified attribute name \"(.+?)\" is not specified in version v1\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/funqy/funqy-amazon-lambda/runtime/src/main/java/io/quarkus/funqy/lambda/model/cloudevents/CloudEventV1.java","lineNumber":155,"sourceCode":"    }\n\n    @Override\n    public OffsetDateTime getTime() {\n        return this.time;\n    }\n\n    @Override\n    public Object getAttribute(final String attributeName) throws IllegalArgumentException {\n        return switch (attributeName) {\n            case \"specversion\" -> getSpecVersion();\n            case \"id\" -> getId();\n            case \"source\" -> getSource();\n            case \"type\" -> getType();\n            case \"datacontenttype\" -> getDataContentType();\n            case \"dataschema\" -> getDataSchema();\n            case \"subject\" -> getSubject();\n            case \"time\" -> getTime();\n            default -> throw new IllegalArgumentException(\n                    \"The specified attribute name \\\"\" + attributeName + \"\\\" is not specified in version v1.\");\n        };\n    }\n\n    @Override\n    public Object getExtension(final String s) {\n        if (s == null) {\n            throw new IllegalArgumentException(\"Extension name cannot be null\");\n        }\n        return this.extensions.get(s);\n    }\n\n    @Override\n    public Set<String> getExtensionNames() {\n        return this.extensions.keySet();\n    }\n}\n","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/funqy/funqy-amazon-lambda/runtime/src/main/java/io/quarkus/funqy/lambda/model/cloudevents/CloudEventV1.java#L137-L173","documentation":"CloudEventV1.getAttribute validates the requested attribute name against the CloudEvents spec v1.0 attributes (id, source, type, specversion, datacontenttype, dataschema, subject, time). Any other name results in IllegalArgumentException.","triggerScenarios":"Calling getAttribute(String) with a name not handled by the v1 switch — a typo (e.g. 'eventtype'), wrong case, or an extension name passed to getAttribute instead of getExtension.","commonSituations":"Generic CloudEvent forwarding code assuming v0.3 attribute names; looking up extension attributes via getAttribute; typos in hardcoded attribute strings.","solutions":["Use only v1 spec attribute names: id, source, type, specversion, datacontenttype, dataschema, subject, time","Use getExtension(s) for extension attributes","Check case-sensitivity of the attribute name"],"exampleFix":"// before\nObject v = event.getAttribute(\"eventtype\");\n// after\nObject v = event.getAttribute(\"type\");","handlingStrategy":"validation","validationCode":"private static final Set<String> V1_ATTRS = Set.of(\"id\",\"source\",\"type\",\"specversion\",\"datacontenttype\",\"dataschema\",\"subject\",\"time\");\nif (!V1_ATTRS.contains(attrName)) { /* route to getExtension or reject */ }","typeGuard":"boolean isV1Attribute(String name) {\n    return name != null && Set.of(\"id\",\"source\",\"type\",\"specversion\",\"datacontenttype\",\"dataschema\",\"subject\",\"time\").contains(name);\n}","tryCatchPattern":"try {\n    value = event.getAttribute(name);\n} catch (IllegalArgumentException e) {\n    value = event.getExtension(name);\n}","preventionTips":["Use spec v1 attribute names, case-sensitive","Route extension lookups to getExtension","Centralize attribute-name constants"],"tags":["cloudevents","funqy","validation"],"backgroundTag":"invalid-attribute-name","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}