Skip to content

Commit

Permalink
fix: add special error message app for installs in preprod envs (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarlaud authored Dec 19, 2024
1 parent 6633d62 commit fb20b36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export const installAppIdOnOrgId = async (orgId: string): Promise<AppInstallResp
logger.debug({url: req.url, statusCode: response.statusCode, response: response.body}, 'Response')
return JSON.parse(response.body)
} catch (error: any) {
if (error.includes('HTTP 404: Not Found: app not found')) {
throw new Error(`Unable to find the app ID.
For pre-prod environments, set the environment variable SNYK_BROKER_APP_ID=921020b6-b167-426e-867b-3e2856a2f56e.
For snykgov environments, please contact support.
`)
}
throw new Error(error)
}
}
Expand Down

0 comments on commit fb20b36

Please sign in to comment.