Skip to content

Commit 51550a4

Browse files
chore(scorecard): log metric provider errors (#2844)
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
1 parent f6742c4 commit 51550a4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

workspaces/scorecard/plugins/scorecard-backend/src/scheduler/tasks/PullMetricsByProviderTask.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ export class PullMetricsByProviderTask implements SchedulerTask {
181181
} catch (error) {
182182
// status is intentionally omitted — a calculation failure produces a NULL status
183183
// in the database, which sorts last when sortBy=status is used
184+
logger.warn(
185+
`Failed to calculate metric for entity ${stringifyEntityRef(
186+
entity,
187+
)}: ${error}`,
188+
error instanceof Error ? error : undefined,
189+
);
184190
return {
185191
catalog_entity_ref: stringifyEntityRef(entity),
186192
metric_id: this.providerId,

0 commit comments

Comments
 (0)