Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,14 @@ export const Combobox: FunctionComponent<ComboboxProps> = ({

const setActiveElement = useCallback(
(element: string) => {
if (!filteredOptions.find((el) => element === el.id)?.isSelectable) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a weird bug in which you could select the Bitbucket server help message as a context URL by clicking on it with your pointer and pressing Enter

return;
}
setSelectedElementTemp(element);
const el = document.getElementById(element);
el?.scrollIntoView({ block: "nearest" });
},
[setSelectedElementTemp],
[filteredOptions],
);

const handleOpenChange = useCallback(
Expand Down
6 changes: 5 additions & 1 deletion components/server/src/workspace/context-parser-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
Loading