@@ -5,7 +5,10 @@ import type { OrganizationRepo } from "../db/repo/organization.ts";
55import type { KubernetesClientService } from "./common/cluster/kubernetes.ts" ;
66import type { DeploymentConfigService } from "./common/deploymentConfig.ts" ;
77import type { GitProviderFactoryService } from "./common/git/gitProvider.ts" ;
8- import { DeploymentNotFoundError } from "./errors/index.ts" ;
8+ import {
9+ DeploymentNotFoundError ,
10+ InstallationNotFoundError ,
11+ } from "./errors/index.ts" ;
912
1013export class GetDeploymentService {
1114 private orgRepo : OrganizationRepo ;
@@ -57,11 +60,17 @@ export class GetDeploymentService {
5760 let repositoryURL : string | null = null ;
5861 let pods : V1PodList | null = null ;
5962 if ( config . source === "GIT" ) {
60- const gitProvider = await this . gitProviderFactoryService . getGitProvider (
61- org . id ,
62- ) ;
63- const repo = await gitProvider ?. getRepoById ( config . repositoryId ) ;
64- repositoryURL = repo ?. htmlURL ;
63+ try {
64+ const gitProvider = await this . gitProviderFactoryService . getGitProvider (
65+ org . id ,
66+ ) ;
67+ const repo = await gitProvider ?. getRepoById ( config . repositoryId ) ;
68+ repositoryURL = repo ?. htmlURL ;
69+ } catch ( e ) {
70+ if ( ! ( e instanceof InstallationNotFoundError ) ) {
71+ throw e ;
72+ }
73+ }
6574 }
6675 if ( config . appType === "workload" ) {
6776 pods = await api
0 commit comments