Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
Signed-off-by: droctothorpe <[email protected]>
  • Loading branch information
droctothorpe committed Nov 19, 2024
1 parent b373f18 commit 559d431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/server/workflow-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,11 @@ export async function getKeyFormatFromArtifactRepositories(
namespace: string,
): Promise<string | undefined> {
try {
const [configMap] = await getConfigMap('artifact-repositories', namespace);
const [configMap, k8sError] = await getConfigMap('artifact-repositories', namespace);
if (configMap === undefined) {
// If there is no artifact-repositories configmap, return undefined. The
// caller will just use keyFormat as specified in configs.ts.
return undefined;
throw k8sError
}
let artifactRepositories = configMap?.data['artifact-repositories'];
const artifactRepositories = configMap?.data['artifact-repositories'];
const artifactRepositoriesValue = JsYaml.safeLoad(
artifactRepositories,
) as PartialArtifactRepositoriesValue;
Expand Down
1 change: 1 addition & 0 deletions manifests/kustomize/base/pipeline/ml-pipeline-ui-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rules:
- ""
resources:
- secrets
- configmaps
verbs:
- get
- list
Expand Down

0 comments on commit 559d431

Please sign in to comment.