Skip to content

Commit a20179f

Browse files
committed
add indicative msg
1 parent 683fbd5 commit a20179f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/main/client/AstClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export class AstClient {
2323
throw error;
2424
} finally {
2525
writer.close();
26-
logger.info('Write stream closed.');
2726
}
2827
}
2928
}

src/main/client/HttpClient.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {Client} from "./Client";
44

55
export class HttpClient implements Client {
66
private readonly axiosConfig: AxiosRequestConfig;
7+
private readonly domainErrMsg = 'Unable to download the CLI from the URL. Try adding the domain: \'download.checkmarx.com\' to your allow list.';
78

89
constructor() {
910
this.axiosConfig = {
@@ -45,6 +46,9 @@ export class HttpClient implements Client {
4546
return response;
4647
} catch (error) {
4748
logger.error(`Error sending ${method} request to ${url}: ${error.message || error}`);
49+
if (this.axiosConfig.proxy!==undefined) {
50+
throw new Error(`${this.domainErrMsg} \nError: ${error.message || error}`);
51+
}
4852
throw error;
4953
}
5054
}

src/main/osinstaller/CxInstaller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export class CxInstaller {
103103
logger.info('Extracted CLI to:', this.resourceDirPath);
104104
} catch (error) {
105105
logger.error('Error during installation:', error);
106+
process.exit(1);
106107
}
107108
}
108109

0 commit comments

Comments
 (0)