fix(push-admin): show test push delivery errors
This commit is contained in:
@@ -82,14 +82,14 @@ async function sendTestPush() {
|
||||
});
|
||||
await Promise.all([refreshInstance(), refreshJobs(), refreshDevices()]);
|
||||
toast.add({
|
||||
title: "Test-Push gesendet",
|
||||
description: `${result.sent ?? 0} gesendet, ${result.failed ?? 0} fehlgeschlagen`,
|
||||
color: result.failed ? "warning" : "success",
|
||||
title: result.failed ? (result.sent ? "Test-Push teilweise fehlgeschlagen" : "Test-Push fehlgeschlagen") : "Test-Push gesendet",
|
||||
description: [`${result.sent ?? 0} gesendet, ${result.failed ?? 0} fehlgeschlagen`, result.lastErrorCode, result.lastErrorMessage].filter(Boolean).join(" · "),
|
||||
color: result.failed ? (result.sent ? "warning" : "error") : "success",
|
||||
});
|
||||
} catch (error: any) {
|
||||
toast.add({
|
||||
title: "Test-Push fehlgeschlagen",
|
||||
description: error?.data?.message || error?.message || "Die Testnachricht konnte nicht gesendet werden.",
|
||||
description: error?.data?.message || error?.data?.error || error?.message || "Die Testnachricht konnte nicht gesendet werden.",
|
||||
color: "error",
|
||||
});
|
||||
} finally {
|
||||
@@ -246,6 +246,7 @@ async function sendTestPush() {
|
||||
<th>Angenommen</th>
|
||||
<th>Gesendet</th>
|
||||
<th>Fehler</th>
|
||||
<th>Letzter Fehler</th>
|
||||
<th>Erstellt</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -256,6 +257,10 @@ async function sendTestPush() {
|
||||
<td>{{ job.acceptedCount }}</td>
|
||||
<td>{{ job.sentCount }}</td>
|
||||
<td>{{ job.failedCount }}</td>
|
||||
<td>
|
||||
<div>{{ job.lastErrorCode || "-" }}</div>
|
||||
<div v-if="job.lastErrorMessage" class="text-sm text-gray-500">{{ job.lastErrorMessage }}</div>
|
||||
</td>
|
||||
<td>{{ new Date(job.createdAt).toLocaleString() }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user