sendgrid-template-helper
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -98,4 +98,4 @@ const fs = require('fs'); | ||
.catch(err => { | ||
if (err.code === 401) { | ||
err = new Error('Invalid Sendgrid API Key'); | ||
if (err.code === 401 || err.code === 403) { | ||
err = new Error('Invalid SendGrid API Key'); | ||
} | ||
@@ -102,0 +102,0 @@ return Promise.reject(err); |
{ | ||
"name": "sendgrid-template-helper", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "The Sendgrid wrapper helps to send an email with a dynamic template stored on disk.", | ||
@@ -17,3 +17,3 @@ "main": "./lib/index.js", | ||
"keywords": [ | ||
"Sendgrid", | ||
"SendGrid", | ||
"Dynamic Template" | ||
@@ -20,0 +20,0 @@ ], |
[![npm version](https://badge.fury.io/js/sendgrid-template-helper.svg)](https://badge.fury.io/js/sendgrid-template-helper) | ||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
[![license](https://img.shields.io/npm/l/sendgrid-template-helper.svg)](https://github.com/t-ho/sendgrid-template-helper/blob/master/LICENSE) | ||
[![license](https://img.shields.io/npm/l/sendgrid-template-helper)](https://github.com/t-ho/sendgrid-template-helper/blob/master/LICENSE) | ||
# sendgrid-template-helper | ||
The Sendgrid wrapper helps to send an email with a dynamic template stored on disk. First, it tries to create a dynamic template on the Sendgrid server via [Sendgrid API v3](https://sendgrid.com/docs/API_Reference/api_v3.html), then caches the template ID locally for later uses. | ||
The Sendgrid wrapper helps to send an email with a dynamic template stored on disk. It tries to create a dynamic template on the Sendgrid server via [Sendgrid API v3](https://sendgrid.com/docs/API_Reference/api_v3.html), then caches the template ID locally for later uses. | ||
@@ -9,0 +9,0 @@ ## Installation |
11911