Skip to content

Commit

Permalink
Return empty list if err with k8s call for submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
evanjt committed Nov 4, 2024
1 parent 2465cb6 commit 6cd26ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/external/k8s/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ pub async fn refresh_token_and_get_client() -> Result<Client> {

pub async fn get_jobs_for_submission_id(submission_id: Uuid) -> Result<Vec<PodName>> {
// Get app config and kube client
let pods = get_pods().await.unwrap();
let pods = match get_pods().await {
Ok(pods) => pods,
Err(_) => Vec::new(), // Return an empty list if there's an error
};

// Filter pods by submission_id
let jobs: Vec<PodName> = pods
Expand Down

0 comments on commit 6cd26ca

Please sign in to comment.