.
This commit is contained in:
1 parent
221a4f2097
commit
b152a5b0fa
5 files changed
+91
-6
No files matched your search
@@ -47,8 +47,16 @@ export class SecretService {
|
||||
this.projectId = this.config.get<string>('INFISICAL_PROJECT_ID') as string;
|
||||
// console.log(this.siteUrl, this.clientSecret, this.clientId, this.projectId)
|
||||
|
||||
if (!this.siteUrl || !this.clientSecret || !this.clientId) {
|
||||
throw new Error('Missing required Infisical configuration');
|
||||
const missing = [
|
||||
!this.siteUrl && 'INFISICAL_SITE_URL',
|
||||
!this.clientId && 'INFISICAL_CLIENT_ID',
|
||||
!this.clientSecret && 'INFISICAL_CLIENT_SECRET',
|
||||
!this.projectId && 'INFISICAL_PROJECT_ID',
|
||||
].filter(Boolean);
|
||||
if (missing.length > 0) {
|
||||
throw new Error(
|
||||
`Missing required Infisical configuration: ${missing.join(', ')}`,
|
||||
);
|
||||
}
|
||||
|
||||
this.infisicalClient = new InfisicalSDK({ siteUrl: this.siteUrl });
|
||||
|
||||
Reference in new issue
Block a user