Propagate configuration errors from running queries

This commit is contained in:
Henry Mercer 2024-07-02 14:53:43 +02:00
parent ee4ad8b9d6
commit 7e6aa4d65a
6 changed files with 16 additions and 12 deletions

3
lib/analyze-action.js generated
View file

@ -222,7 +222,8 @@ async function run() {
}
if (error instanceof analyze_1.CodeQLAnalysisError) {
const stats = { ...error.queriesStatusReport };
await sendStatusReport(startedAt, config, stats, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanupTelemetry, logger);
await sendStatusReport(startedAt, config, stats, error.error, // use the underlying error in case it is a configuration error
trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanupTelemetry, logger);
}
else {
await sendStatusReport(startedAt, config, undefined, error, trapCacheUploadTime, dbCreationTimings, didUploadTrapCaches, trapCacheCleanupTelemetry, logger);