diff --git a/ghost/members-api/index.js b/ghost/members-api/index.js index b89b470c01..f5006f8f64 100644 --- a/ghost/members-api/index.js +++ b/ghost/members-api/index.js @@ -225,8 +225,9 @@ module.exports = function MembersApi({ res.writeHead(201); return res.end('Created.'); } catch (err) { + const statusCode = (err && err.statusCode) || 500; common.logging.error(err); - res.writeHead(500); + res.writeHead(statusCode); return res.end('Internal Server Error.'); } });