Skip to content

Commit ae5de9a

Browse files
committed
Use getErrorMessage in log too
1 parent 0cb8633 commit ae5de9a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/analyze-action.js

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

src/database-upload.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ test("Don't crash if uploading a database fails", async (t) => {
231231
(v) =>
232232
v.type === "warning" &&
233233
v.message ===
234-
"Failed to upload database for javascript: Error: some error message",
234+
"Failed to upload database for javascript: some error message",
235235
) !== undefined,
236236
);
237237
});

src/database-upload.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ export async function cleanupAndUploadDatabases(
138138
}
139139
} catch (e) {
140140
// Log a warning but don't fail the workflow
141-
logger.warning(`Failed to upload database for ${language}: ${e}`);
141+
logger.warning(
142+
`Failed to upload database for ${language}: ${util.getErrorMessage(e)}`,
143+
);
142144
reports.push({
143145
language,
144146
error: util.getErrorMessage(e),

0 commit comments

Comments
 (0)