fix: surface actual error message in ntfy test connection

The catch block was swallowing the real error from the ntfy server,
making it impossible to diagnose connection failures (e.g. SSL, DNS,
auth issues). Now the underlying error message is included in the
tRPC error response.

Closes #4047
This commit is contained in:
Mauricio Siu
2026-04-05 14:08:55 -06:00
parent 30d5493281
commit ac65cc97f4
@@ -677,7 +677,10 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error testing the notification",
message:
error instanceof Error
? `Error testing the notification: ${error.message}`
: "Error testing the notification",
cause: error,
});
}