{"record":{"id":"373e85bf03d0f943","repo":"quarkusio/quarkus","slug":"unknown-mode","errorCode":null,"errorMessage":"unknown mode:","messagePattern":"unknown mode:","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/app/BootstrapProfile.java","lineNumber":62,"sourceCode":"        if (profile != null) {\n            return profile;\n        }\n\n        profile = runtimeDefaultProfile;\n        if (profile != null) {\n            return profile;\n        }\n        switch (mode) {\n            case REMOTE_DEV_SERVER:\n            case DEV:\n            case CONTINUOUS_TEST:\n                return DEV;\n            case REMOTE_DEV_CLIENT:\n            case PROD:\n            case RUN:\n                return PROD;\n            default:\n                throw new RuntimeException(\"unknown mode:\" + mode);\n        }\n    }\n}\n","sourceCodeStart":44,"sourceCodeEnd":66,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/app/BootstrapProfile.java#L44-L66","documentation":"BootstrapProfile.getActiveProfile maps a LaunchMode (NORMAL, DEV, TEST, etc.) to a bootstrap profile (TEST, DEV, PROD). The default branch throws a RuntimeException \"unknown mode:\" for any LaunchMode value it has no mapping for — i.e. an unhandled enum constant such as REMOTE_DEV or DEVELOPMENT variants not covered by the switch.","triggerScenarios":"Calling getActiveProfile with a LaunchMode not listed in the switch cases (e.g. REMOTE_DEV itself, newer LaunchMode constants added after this code was written, or a null/custom mode).","commonSituations":"Using a newer Quarkus LaunchMode enum with an older bootstrap library (version skew), passing LaunchMode.REMOTE_DEV where only client/prod are handled, or reflection/manual invocation of the bootstrap API with an exotic mode.","solutions":["Upgrade quarkus-bootstrap so it covers the LaunchMode constants in use","Pass one of the supported modes: NORMAL, DEV, TEST, PROD, REMOTE_DEV_CLIENT","Check for version skew between the bootstrap core jar and quarkus-core that define LaunchMode"],"exampleFix":"// before\nbuilder.setLaunchMode(LaunchMode.REMOTE_DEV);\n// after\nbuilder.setLaunchMode(LaunchMode.NORMAL); // or upgrade bootstrap to map REMOTE_DEV","handlingStrategy":"validation","validationCode":"LaunchMode mode = LaunchMode.DEV;\nSet<LaunchMode> supported = Set.of(LaunchMode.NORMAL, LaunchMode.DEV, LaunchMode.TEST, LaunchMode.PROD, LaunchMode.REMOTE_DEV_CLIENT);\nif (!supported.contains(mode)) throw new IllegalArgumentException(\"Unsupported mode: \" + mode);","typeGuard":null,"tryCatchPattern":"try {\n    profile = BootstrapProfile.getActiveProfile(mode);\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"unknown mode:\")) { /* fall back to LaunchMode.NORMAL */ }\n}","preventionTips":["Only pass modes the bootstrap version supports","Keep bootstrap-core and quarkus-core on matching versions","Check LaunchMode enum coverage after Quarkus upgrades"],"tags":["launch-mode","profile","enum"],"backgroundTag":"unsupported-launch-mode","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}