Only print the full error message in debug mode
This commit is contained in:
Родитель
e0ff272230
Коммит
375dacad24
|
@ -346,10 +346,13 @@ function handleProcessingResultForUnsuccessfulExecution(response, status, logger
|
|||
'"unsuccessful execution" error, and no other errors.');
|
||||
}
|
||||
else {
|
||||
throw new Error(`${"Failed to upload a SARIF file for the unsuccessful execution. Code scanning status " +
|
||||
"information for the repository may be out of date as a result. "}${status === "failed"
|
||||
? `Processing errors: ${response.data.errors}`
|
||||
: 'Encountered no processing errors, but expected to receive an "unsuccessful execution" error.'}`);
|
||||
const shortMessage = "Failed to upload a SARIF file for the unsuccessful execution. Code scanning status " +
|
||||
"information for the repository may be out of date as a result.";
|
||||
const longMessage = shortMessage + status === "failed"
|
||||
? ` Processing errors: ${response.data.errors}`
|
||||
: ' Encountered no processing errors, but expected to receive an "unsuccessful execution" error.';
|
||||
logger.debug(longMessage);
|
||||
throw new Error(shortMessage);
|
||||
}
|
||||
}
|
||||
function validateUniqueCategory(sarif) {
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -488,16 +488,15 @@ function handleProcessingResultForUnsuccessfulExecution(
|
|||
'"unsuccessful execution" error, and no other errors.'
|
||||
);
|
||||
} else {
|
||||
throw new Error(
|
||||
`${
|
||||
"Failed to upload a SARIF file for the unsuccessful execution. Code scanning status " +
|
||||
"information for the repository may be out of date as a result. "
|
||||
}${
|
||||
status === "failed"
|
||||
? `Processing errors: ${response.data.errors}`
|
||||
: 'Encountered no processing errors, but expected to receive an "unsuccessful execution" error.'
|
||||
}`
|
||||
);
|
||||
const shortMessage =
|
||||
"Failed to upload a SARIF file for the unsuccessful execution. Code scanning status " +
|
||||
"information for the repository may be out of date as a result.";
|
||||
const longMessage =
|
||||
shortMessage + status === "failed"
|
||||
? ` Processing errors: ${response.data.errors}`
|
||||
: ' Encountered no processing errors, but expected to receive an "unsuccessful execution" error.';
|
||||
logger.debug(longMessage);
|
||||
throw new Error(shortMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче