{"record":{"id":"f924fd3dbbd8b7aa","repo":"github/copilot-sdk","slug":"unknown-autotier-value-value","errorCode":null,"errorMessage":"Unknown AutoTier value: + value","messagePattern":"Unknown AutoTier value: \\+ value","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"java/sdk/src/main/java/com/github/copilot/rpc/AutoTier.java","lineNumber":61,"sourceCode":"     * Deserializes a JSON string into its routing tier.\n     *\n     * @param value\n     *            the JSON string value\n     * @return the matching tier, or {@code null} if value is {@code null}\n     * @throws IllegalArgumentException\n     *             if the value does not match a known routing tier\n     */\n    @JsonCreator\n    public static AutoTier fromValue(String value) {\n        if (value == null) {\n            return null;\n        }\n        for (AutoTier tier : values()) {\n            if (tier.value.equals(value)) {\n                return tier;\n            }\n        }\n        throw new IllegalArgumentException(\"Unknown AutoTier value: \" + value);\n    }\n}\n","sourceCodeStart":43,"sourceCodeEnd":64,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/java/sdk/src/main/java/com/github/copilot/rpc/AutoTier.java#L43-L64","documentation":"AutoTier.fromValue maps a string to the AutoTier enum. If the value matches no enum constant, it throws IllegalArgumentException with the raw value included. This surfaces unsupported or misspelled tier names from configuration or protocol messages.","triggerScenarios":"Calling AutoTier.fromValue with a tier string not among the enum's values — typos, wrong casing, numeric tier strings where names are expected, or tiers from a newer API version.","commonSituations":"Config files naming a tier that the installed SDK doesn't know; server sending a newly introduced tier; users writing \"auto\" vs the exact enum value.","solutions":["Inspect AutoTier.values() and correct the value to an accepted constant.","Upgrade the SDK if the tier was added in a newer release.","Validate user/config input against the known values before calling fromValue.","Catch IllegalArgumentException and fall back to a sensible default tier."],"exampleFix":"// before\nAutoTier tier = AutoTier.fromValue(cfg.tier());\n\n// after\nAutoTier tier;\ntry {\n    tier = AutoTier.fromValue(cfg.tier());\n} catch (IllegalArgumentException e) {\n    tier = AutoTier.NONE;\n}","handlingStrategy":"validation","validationCode":"static boolean isKnownAutoTier(String v) {\n    for (AutoTier t : AutoTier.values()) {\n        if (t.name().equalsIgnoreCase(v)) return true;\n    }\n    return false;\n}","typeGuard":null,"tryCatchPattern":"try {\n    tier = AutoTier.fromValue(value);\n} catch (IllegalArgumentException e) {\n    tier = AutoTier.NONE;\n}","preventionTips":["Validate tier values when parsing config files","Normalize casing and trim whitespace before fromValue","Upgrade the SDK when the API introduces new tiers","Document the accepted tier strings wherever the value is user-editable"],"tags":["java","enum","rpc","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}