spacefill / gibbon-mail

Send mails with mjml Template and JSON Schema
3 stars 1 forks source link

scope error for variable nunjucksEnv prevent service from sending message #11

Closed Claire-Couppie closed 3 years ago

Claire-Couppie commented 3 years ago
gibbon-mail_1  |   ReferenceError: nunjucksEnv is not defined
gibbon-mail_1  |       at getSubject (/src/src/app.js:119:5)
gibbon-mail_1  |       at /src/src/app.js:249:18
gibbon-mail_1  |       at dispatch (/src/node_modules/koa-compose/index.js:42:32)
gibbon-mail_1  |       at /src/node_modules/koa-router/lib/router.js:372:16
gibbon-mail_1  |       at dispatch (/src/node_modules/koa-compose/index.js:42:32)
gibbon-mail_1  |       at /src/node_modules/koa-compose/index.js:34:12
gibbon-mail_1  |       at dispatch (/src/node_modules/koa-router/lib/router.js:377:31)
gibbon-mail_1  |       at dispatch (/src/node_modules/koa-compose/index.js:42:32)
gibbon-mail_1  |       at cors (/src/node_modules/@koa/cors/index.js:56:38)
gibbon-mail_1  |       at dispatch (/src/node_modules/koa-compose/index.js:42:32)
gibbon-mail_1  | 

Indeed nunjucksEnv is declared inside try scope and is not found outside

Its-Alex commented 3 years ago

Fixed by https://github.com/spacefill/gibbon-mail/pull/12