Skip to content

Open-source status page, incident response and uptime monitoring

Fix Notification dead-letters silently dropped, unmonitored (#2637)

polylane[bot]245347f32165
diff --git a/apps/workflows/src/checker/outbox.ts b/apps/workflows/src/checker/outbox.ts
index 05bbad81c..0d518f6aa 100644
--- a/apps/workflows/src/checker/outbox.ts
+++ b/apps/workflows/src/checker/outbox.ts
@@ -438,6 +438,21 @@ async function commitDead(
new Error(
`Notification dead-lettered: ${row.provider} for monitor ${row.monitorId}`,
),
+ {
+ tags: {
+ provider: row.provider,
+ event_type: row.eventType,
+ from_status: row.fromStatus,
+ to_status: row.toStatus,
+ },
+ extra: {
+ monitor_id: row.monitorId,
+ notification_id: row.notificationId,
+ workspace_id: row.workspaceId,
+ attempts: row.attempts,
+ final_error: error,
+ },
+ },
);
}
}
diff --git a/packages/notifications/ntfy/src/index.ts b/packages/notifications/ntfy/src/index.ts
index 64e094d00..a6dbe4483 100644
--- a/packages/notifications/ntfy/src/index.ts
+++ b/packages/notifications/ntfy/src/index.ts
@@ -32,7 +32,9 @@ export const sendAlert = async ({
},
});
if (!res.ok) {
- throw new Error(`Failed to send alert notification: ${res.statusText}`);
+ throw new Error(
+ `Failed to send alert notification: ${res.status} ${res.statusText}`,
+ );
}
};
@@ -61,7 +63,9 @@ export const sendRecovery = async ({
},
});
if (!res.ok) {
- throw new Error(`Failed to send recovery notification: ${res.statusText}`);
+ throw new Error(
+ `Failed to send recovery notification: ${res.status} ${res.statusText}`,
+ );
}
};
@@ -91,7 +95,9 @@ export const sendDegraded = async ({
},
});
if (!res.ok) {
- throw new Error(`Failed to send degraded notification: ${res.statusText}`);
+ throw new Error(
+ `Failed to send degraded notification: ${res.status} ${res.statusText}`,
+ );
}
};