{"record":{"id":"c842cd052920f06d","repo":"github/copilot-sdk","slug":"unknown-workspacesworkspacedetailshosttype-value","errorCode":null,"errorMessage":"Unknown WorkspacesWorkspaceDetailsHostType value: ${value}","messagePattern":"Unknown WorkspacesWorkspaceDetailsHostType value: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkspacesWorkspaceDetailsHostType.java","lineNumber":33,"sourceCode":" * @since 1.0.0\n */\n@javax.annotation.processing.Generated(\"copilot-sdk-codegen\")\npublic enum WorkspacesWorkspaceDetailsHostType {\n    /** The {@code github} variant. */\n    GITHUB(\"github\"),\n    /** The {@code ado} variant. */\n    ADO(\"ado\");\n\n    private final String value;\n    WorkspacesWorkspaceDetailsHostType(String value) { this.value = value; }\n    @com.fasterxml.jackson.annotation.JsonValue\n    public String getValue() { return value; }\n    @com.fasterxml.jackson.annotation.JsonCreator\n    public static WorkspacesWorkspaceDetailsHostType fromValue(String value) {\n        for (WorkspacesWorkspaceDetailsHostType v : values()) {\n            if (v.value.equals(value)) return v;\n        }\n        throw new IllegalArgumentException(\"Unknown WorkspacesWorkspaceDetailsHostType value: \" + value);\n    }\n}\n","sourceCodeStart":15,"sourceCodeEnd":36,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkspacesWorkspaceDetailsHostType.java#L15-L36","documentation":"WorkspacesWorkspaceDetailsHostType.fromValue is the Jackson @JsonCreator for the WorkspacesWorkspaceDetailsHostType enum. It throws IllegalArgumentException when the supplied string matches no declared constant. This indicates the SDK received a workspace-details host-type value it cannot map.","triggerScenarios":"Deserializing a workspaces workspace-details payload with an unrecognized hostType string, or invoking fromValue directly with a value outside the generated enum.","commonSituations":"SDK/CLI version mismatch where the server emits a newly added host type; manual string construction with typos; proxy layers rewriting values.","solutions":["Update the Java SDK to a version whose generated enum covers the new host type.","Read the unknown value from the exception message and compare with the enum constants.","Pin CLI and SDK versions together to avoid generated-enum drift."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"boolean known = Stream.of(WorkspacesWorkspaceDetailsHostType.values()).anyMatch(v -> v.getValue().equals(raw));\nif (!known) log.warn(\"Unsupported workspace host type: {}\", raw);","typeGuard":null,"tryCatchPattern":"try {\n  WorkspacesWorkspaceDetailsHostType t = WorkspacesWorkspaceDetailsHostType.fromValue(raw);\n} catch (IllegalArgumentException e) {\n  log.warn(\"Unknown workspace host type '{}'\", raw);\n}","preventionTips":["Pin CLI and SDK versions to matching releases.","Treat unknown host types as non-fatal with a default/unknown fallback.","Regenerate RPC enums whenever the protocol schema changes."],"tags":["java","enum","deserialization","generated-code"],"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"}