aboutsummaryrefslogtreecommitdiff
path: root/vnext
diff options
context:
space:
mode:
Diffstat (limited to 'vnext')
-rw-r--r--vnext/server/middleware/oembed.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/vnext/server/middleware/oembed.js b/vnext/server/middleware/oembed.js
index 43bed1945..ea53ca9cc 100644
--- a/vnext/server/middleware/oembed.js
+++ b/vnext/server/middleware/oembed.js
@@ -11,9 +11,8 @@ const oembed = async (req, res) => {
res.send(result);
res.end();
}).catch(err => {
- console.log(`Err: ${err.response.status}`);
- res.status(err.response.status);
- res.send({});
+ console.log(`Err: ${err.response ? err.response.status : err.code}`);
+ res.sendStatus(err.response ? err.response.status : 500);
res.end();
});
};