diff --git a/components/dashboard/src/components/podkit/combobox/Combobox.tsx b/components/dashboard/src/components/podkit/combobox/Combobox.tsx index 84231b95a21c5a..2f057a3b2106fa 100644 --- a/components/dashboard/src/components/podkit/combobox/Combobox.tsx +++ b/components/dashboard/src/components/podkit/combobox/Combobox.tsx @@ -84,11 +84,14 @@ export const Combobox: FunctionComponent = ({ const setActiveElement = useCallback( (element: string) => { + if (!filteredOptions.find((el) => element === el.id)?.isSelectable) { + return; + } setSelectedElementTemp(element); const el = document.getElementById(element); el?.scrollIntoView({ block: "nearest" }); }, - [setSelectedElementTemp], + [filteredOptions], ); const handleOpenChange = useCallback( diff --git a/components/server/src/workspace/context-parser-service.ts b/components/server/src/workspace/context-parser-service.ts index f25cef37a85a84..cf76f8b775c0b5 100644 --- a/components/server/src/workspace/context-parser-service.ts +++ b/components/server/src/workspace/context-parser-service.ts @@ -11,6 +11,7 @@ import { IPrefixContextParser, IContextParser } from "./context-parser"; import { TraceContext } from "@gitpod/gitpod-protocol/lib/util/tracing"; import { ConfigProvider } from "./config-provider"; import { InvalidGitpodYMLError } from "@gitpod/public-api-common/lib/public-api-errors"; +import { ApplicationError, ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error"; @injectable() export class ContextParser { @@ -83,7 +84,10 @@ export class ContextParser { } } if (!result) { - throw new Error(`Couldn't parse context '${nonPrefixedContextURL}'.`); + throw new ApplicationError( + ErrorCodes.BAD_REQUEST, + `Couldn't parse context '${nonPrefixedContextURL}'.`, + ); } // TODO: Make the parsers return the context with normalizedContextURL set