feat: Add Gotify notification service and integrate it with error reporting and contact form actions, making error reporting methods asynchronous.
Some checks failed
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Successful in 7s
Build & Deploy KLZ Cables / 🏗️ Build App (push) Successful in 4m3s
Build & Deploy KLZ Cables / 🏗️ Build Gatekeeper (push) Successful in 20s
Build & Deploy KLZ Cables / 🚀 Deploy (push) Has been cancelled
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Has been cancelled
Build & Deploy KLZ Cables / 🔔 Notifications (push) Has been cancelled
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Has been cancelled

This commit is contained in:
2026-02-02 17:38:15 +01:00
parent f1b617e967
commit 81af9bf3dd
11 changed files with 159 additions and 19 deletions

View File

@@ -69,9 +69,19 @@ export async function sendContactFormAction(formData: FormData) {
if (result.success) {
logger.info('Contact form email sent successfully', { messageId: result.messageId });
await services.notifications.notify({
title: `📩 ${subject}`,
message: `New message from ${name} (${email}):\n\n${message}`,
priority: 5,
});
} else {
logger.error('Failed to send contact form email', { error: result.error });
services.errors.captureException(result.error, { action: 'sendContactFormAction', email });
await services.notifications.notify({
title: '🚨 Contact Form Error',
message: `Failed to send email for ${name} (${email}). Error: ${JSON.stringify(result.error)}`,
priority: 8,
});
}
return result;