Skip to content

Commit

Permalink
Changed logging got network errors to be more direct about what the s…
Browse files Browse the repository at this point in the history
…ource of the error was
  • Loading branch information
bamandel committed Mar 19, 2021
1 parent 4afd04c commit c38bb6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions tasks/synopsys-detect-task/detect-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ async function run() {
try {
await DetectScriptDownloader.downloadScript(blackduckConfiguration.proxyInfo, detectScript.getScriptName(), scriptFolder)
} catch (error) {
logger.debug(`Ran into an issue while downloading script: ${error}`)
logger.error(`Unable to connect with ${DetectScriptDownloader.DETECT_DOWNLOAD_URL}`)
logger.error('This may be a problem with your proxy setup or network.')

const resultError = `There was an issue downloading the Detect script: ${error}`
if(additionalConfiguration.addTaskSummary) {
addSummaryAttachment('There was an issue downloading the Detect script')
addSummaryAttachment(resultError)
}
task.setResult(task.TaskResult.Failed, `Detect run failed, there was an issue downloading the Detect script`)
task.setResult(task.TaskResult.Failed, resultError)
return
}

Expand Down
2 changes: 1 addition & 1 deletion tasks/synopsys-detect-task/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 3,
"Minor": 1,
"Patch": 40
"Patch": 41
},
"minimumAgentVersion": "1.95.0",
"instanceNameFormat": "Run Synopsys Detect for your build $(message)",
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifestVersion": 1,
"id": "synopsys-detect-QA",
"version": "3.1.40",
"version": "3.1.41",
"name": "Synopsys Detect QA",
"publisher": "synopsys-detect",
"public": false,
Expand Down

0 comments on commit c38bb6c

Please sign in to comment.