|
throw new Error(`DKIM signature verification failed for domain ${signingDomain}. Reason: ${comment}`); |
Currently, errors are returned as plain strings, which makes it harder to programmatically handle and segregate them in downstream applications.
throw new Error(JSON.stringify({
message: `DKIM signature verification failed for domain ${signingDomain}.`,
reason: `${comment}`
}));