feat(chore): improve dkim loading error message
This commit is contained in:
parent
82533c7de9
commit
62b85ce3c9
|
@ -1,10 +1,11 @@
|
|||
// @deno-types="npm:@types/nodemailer"
|
||||
import nodemailer from 'nodemailer'
|
||||
|
||||
const dkimPrivateKey = await Deno.readTextFile(
|
||||
'/home/julien/dkim_sendmail_keys/dkim_sendmail_cohabit_fr.pem',
|
||||
).catch((cause) => {
|
||||
throw new Error('unable to load DKIM private key', { cause })
|
||||
const dkimPath = '/home/julien/dkim_sendmail_keys/dkim_sendmail_cohabit_fr.pem'
|
||||
const dkimPrivateKey = await Deno.readTextFile(dkimPath).catch((cause) => {
|
||||
throw new Error(`unable to load DKIM private key from "${dkimPath}"`, {
|
||||
cause,
|
||||
})
|
||||
})
|
||||
|
||||
export const transporter = nodemailer.createTransport({
|
||||
|
|
Loading…
Reference in a new issue