Skip to content

Commit c6267f1

Browse files
committed
test sendgrid/mail for pending
1 parent 81dd552 commit c6267f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/services/sendGrid.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ sgMail.setApiKey(config.SECRET.SENDGRID_API_KEY);
1717
export const sendEmail = async (req, res) => {
1818
try {
1919
const msg = req.body;
20-
const result = await sgMail.send(msg);
20+
// const result = await sgMail.send(msg);
21+
const query = req.query;
22+
if (query.throw) throw new Error('tyr/catch error');
23+
const result = {a: 1};
2124
return result;
2225
} catch (error) {
2326
logger.error(error);

0 commit comments

Comments
 (0)