Skip to content

Commit 2babaa6

Browse files
Only print full error if not a 404
1 parent 001318e commit 2babaa6

3 files changed

Lines changed: 16 additions & 20 deletions

File tree

lib/analyze-action.js

Lines changed: 7 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze-action.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,15 @@ async function uploadDatabases(
8282
repo: repositoryNwo.repo,
8383
});
8484
} catch (e) {
85-
console.log(e);
86-
if (util.isHTTPError(e)) {
87-
if (e.status === 404) {
88-
logger.debug(
89-
"Repository is not opted in to database uploads. Skipping upload."
90-
);
91-
} else {
92-
logger.debug(`Skipping database upload due to unknown error: ${e}`);
93-
}
94-
return;
85+
if (util.isHTTPError(e) && e.status === 404) {
86+
logger.debug(
87+
"Repository is not opted in to database uploads. Skipping upload."
88+
);
89+
} else {
90+
console.log(e);
91+
logger.info(`Skipping database upload due to unknown error: ${e}`);
9592
}
93+
return;
9694
}
9795

9896
const codeql = getCodeQL(config.codeQLCmd);

0 commit comments

Comments
 (0)