aboutsummaryrefslogtreecommitdiff
path: root/vnext/server
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/server')
-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 43bed194..ea53ca9c 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();
});
};