Skip to content

Commit efabeb5

Browse files
committed
Improve error handling
Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
1 parent b373f18 commit efabeb5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

frontend/server/workflow-helper.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,11 @@ export async function getKeyFormatFromArtifactRepositories(
171171
namespace: string,
172172
): Promise<string | undefined> {
173173
try {
174-
const [configMap] = await getConfigMap('artifact-repositories', namespace);
174+
const [configMap, k8sError] = await getConfigMap('artifact-repositories', namespace);
175175
if (configMap === undefined) {
176-
// If there is no artifact-repositories configmap, return undefined. The
177-
// caller will just use keyFormat as specified in configs.ts.
178-
return undefined;
176+
throw k8sError;
179177
}
180-
let artifactRepositories = configMap?.data['artifact-repositories'];
178+
const artifactRepositories = configMap?.data['artifact-repositories'];
181179
const artifactRepositoriesValue = JsYaml.safeLoad(
182180
artifactRepositories,
183181
) as PartialArtifactRepositoriesValue;

manifests/kustomize/base/pipeline/ml-pipeline-ui-role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rules:
2222
- ""
2323
resources:
2424
- secrets
25+
- configmaps
2526
verbs:
2627
- get
2728
- list

0 commit comments

Comments
 (0)