diff --git a/packages/content-handler/src/content-handler.ts b/packages/content-handler/src/content-handler.ts index ea19e2e4e..ae3a81636 100644 --- a/packages/content-handler/src/content-handler.ts +++ b/packages/content-handler/src/content-handler.ts @@ -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 { diff --git a/packages/inbound-email-handler/src/index.ts b/packages/inbound-email-handler/src/index.ts index c34d5f4e0..4ecf6fb57 100644 --- a/packages/inbound-email-handler/src/index.ts +++ b/packages/inbound-email-handler/src/index.ts @@ -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: {