see clear logs

This commit is contained in:
KMKoushik
2025-05-16 22:56:33 +10:00
parent bb8d3a4686
commit 15993785eb

View File

@@ -27,10 +27,10 @@ async function sendEmailToUnsend(emailData: any, apiKey: string) {
}); });
if (!response.ok) { if (!response.ok) {
const errorData = await response.json(); const errorData = await response.text();
console.error("Unsend API error response:", errorData); console.error("Unsend API error response:", errorData);
throw new Error( throw new Error(
`Failed to send email: ${errorData.error.message || "Unknown error from server"}` `Failed to send email: ${errorData || "Unknown error from server"}`
); );
} }