0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/core/server/services
Fabien 'egg' O'Carroll b7a092a24a
🐛 Stopped Ghost crashing when sending bulk emails (#12718)
refs https://github.com/TryGhost/Ghost/issues/12610
refs https://github.com/mailgun/mailgun-js-boland/blob/v0.22.0/lib/request.js#L285-L333

The mailgun domain is used by the mailgun API to construct the URL for
the API. e.g for a domain of "mg.example.com" the URL for the API
messages would look like:

https://api.mailgun.net/v3/mg.example.com/messages

One weird thing about the mailgun API is that if the path does not map
to an API endpoint, then instead of a 404, we get a 200, with a body of
"Mailgun Magnificent API".

The `mailgun-js` library which we use, expects a JSON response, and will
return a body of undefined if it does not get one.

This all resulted in us trying to read the property `id` of an undefined
`body` variable. The fix here is to reject the containing Promise, if
there is no body. So that the default error handling will kick in.
2021-03-03 09:34:44 +00:00
..
adapter-manager Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
auth Switched default API version for JWT 2021-03-02 15:19:33 +13:00
bulk-email 🐛 Stopped Ghost crashing when sending bulk emails (#12718) 2021-03-03 09:34:44 +00:00
email-analytics Fixed analytics require error 2021-03-02 08:26:42 +00:00
invitations 🐛 Fixed error caused by accepting invitation with existing email (#12172) 2020-09-09 11:58:53 +12:00
invites Refactored invites module into a class 2021-01-14 19:42:38 +13:00
jobs Added custom worker message handler 2021-02-22 20:02:00 +13:00
mail 🐛 Fixed ENOTFOUND error handling on NodeJS >=13 2021-02-23 19:37:03 +01:00
mega Added JSDocs to MEGA service 2021-03-02 14:32:43 +13:00
members Switched members services to use v4 API 2021-03-03 14:42:03 +13:00
notifications Fixed update check tests 2021-01-14 18:30:09 +13:00
permissions Fixed "no-shadow" linting error in server modules (#12287) 2020-10-20 12:02:56 +13:00
settings Fixed settings reinit to only emit changed settings events (#12184) 2020-09-23 14:35:03 +01:00
webhooks Bumped webhook API defaults to v4 2021-03-02 12:31:52 +13:00
labs.js Hardcoded labs to always return members:true 2021-02-17 19:55:16 +13:00
oembed.js Moved the OEmbed service to use our DI pattern 2021-01-15 15:35:30 +01:00
slack.js Refactored usage of the pre v4 "slack" setting 2021-02-15 15:25:54 +13:00
users.js Moved the users service to use our DI pattern 2021-01-15 17:58:36 +01:00
xmlrpc.js Adding sentry logging to all ping errors 2021-02-19 14:00:50 +01:00