Add debug logs
This commit is contained in:
@ -173,7 +173,7 @@ export abstract class ContentHandler {
|
||||
(await this.parseNewsletterUrl(headers, html)) || generateUniqueUrl()
|
||||
const author = this.parseAuthor(from)
|
||||
const unsubscribe = headers['list-unsubscribe']
|
||||
? this.parseUnsubscribe(headers['list-unsubscribe']?.toString())
|
||||
? this.parseUnsubscribe(headers['list-unsubscribe'].toString())
|
||||
: undefined
|
||||
|
||||
return {
|
||||
|
||||
@ -189,7 +189,13 @@ export const inboundEmailHandler = Sentry.GCPFunction.wrapHttpFunction(
|
||||
})
|
||||
res.send('newsletter received')
|
||||
} catch (error) {
|
||||
console.log('error handling emails, will forward.', from, to, subject)
|
||||
console.log(
|
||||
'error handling emails, will forward.',
|
||||
from,
|
||||
to,
|
||||
subject,
|
||||
error
|
||||
)
|
||||
// queue error emails
|
||||
await pubsub.topic(NON_NEWSLETTER_EMAIL_TOPIC).publishMessage({
|
||||
json: {
|
||||
|
||||
Reference in New Issue
Block a user