Skip to content

Open-source status page, incident response and uptime monitoring

fix: unresolved reports

Maximilian Kaske6744591b6914
diff --git a/packages/api/src/router/statusPage.utils.ts b/packages/api/src/router/statusPage.utils.ts
index 271a44786..9ab04b545 100644
--- a/packages/api/src/router/statusPage.utils.ts
+++ b/packages/api/src/router/statusPage.utils.ts
@@ -153,9 +153,13 @@ export function getEvents({
const updates = report.statusReportUpdates.sort(
(a, b) => a.date.getTime() - b.date.getTime(),
);
+ if (updates.length === 0) return;
+
const firstUpdate = updates[0];
const lastUpdate = updates[updates.length - 1];
- if (!firstUpdate?.date || firstUpdate.date < pastThreshod) return;
+
+ // NOTE: we don't check threshold here because we display all unresolved reports
+ if (!firstUpdate?.date) return;
// HACKY: LEGACY: we shouldn't have report.status anymore and instead use the update status for that.
// Ideally, we could replace the status with "downtime", "degraded", "operational" to indicate the gravity of the issue