Simplify error handling in processEmailJob

Remove unnecessary instanceof check since String() handles all types consistently.
This commit is contained in:
2025-09-14 20:38:47 +02:00
parent 27d504079a
commit f5e04d33ba

View File

@@ -64,7 +64,7 @@ export const processEmailJob = {
}
}
} 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)}`)
}
}
}