Ghost/core/server
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
..
adapters Improved JSDoc in default scheduler 2020-12-16 17:25:05 +13:00
api Fixed API version used to call mega's addEmail 2021-03-03 13:16:25 +13:00
data 💡 Enabled foreign key checks on sqlite3 2021-03-02 11:13:19 +01:00
lib Added mobiledoc.ghostVersion to blank mobiledoc document 2021-02-15 18:10:56 +00:00
models Bumped webhook API defaults to v4 2021-03-02 12:31:52 +13:00
public Enabled Portal (#12317) 2020-11-03 14:36:21 +05:30
services 🐛 Stopped Ghost crashing when sending bulk emails (#12718) 2021-03-03 09:34:44 +00:00
translations Added ability to install themes directly from GitHub (#12635) 2021-02-12 09:19:17 +00:00
views Added new, simpler, linear boot process 2021-02-08 11:56:44 +00:00
web Added missing v4 API endpoints mount 2021-03-03 18:44:00 +13:00
analytics-events.js Wrapped analytics tracker in try-catch 2021-02-24 15:57:38 +00:00
ghost-server.js Cleaned up use of express in ghost-server 2021-02-23 12:33:00 +00:00
notify.js Refactored notify to send started + ready 2021-02-19 20:42:10 +00:00
overrides.js Moved sqlite3 override rules to db connection lib 2021-02-05 11:51:56 +00:00
update-check.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00