see clear logs
This commit is contained in:
@@ -27,10 +27,10 @@ async function sendEmailToUnsend(emailData: any, apiKey: string) {
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json();
|
||||
const errorData = await response.text();
|
||||
console.error("Unsend API error response:", errorData);
|
||||
throw new Error(
|
||||
`Failed to send email: ${errorData.error.message || "Unknown error from server"}`
|
||||
`Failed to send email: ${errorData || "Unknown error from server"}`
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user