mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 08:13:23 +00:00
Simplify error handling in processEmailJob
Remove unnecessary instanceof check since String() handles all types consistently.
This commit is contained in:
@@ -64,7 +64,7 @@ export const processEmailJob = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Failed to process email ${emailId}: ${error instanceof Error ? error.message : String(error)}`)
|
throw new Error(`Failed to process email ${emailId}: ${String(error)}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user