From d1e3205569f11fcb0d9867dd68de781478c4c7f6 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 13 Jun 2019 10:56:54 +0100 Subject: [PATCH] Add url as context to oembed unknownProvider error - This is so that we can use logs to see urls that turn up with this error --- core/server/api/v0.1/oembed.js | 3 ++- core/server/api/v2/oembed.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/server/api/v0.1/oembed.js b/core/server/api/v0.1/oembed.js index 2843011707..a35f87681d 100644 --- a/core/server/api/v0.1/oembed.js +++ b/core/server/api/v0.1/oembed.js @@ -44,7 +44,8 @@ const oembed = { function unknownProvider() { return Promise.reject(new common.errors.ValidationError({ - message: common.i18n.t('errors.api.oembed.unknownProvider') + message: common.i18n.t('errors.api.oembed.unknownProvider'), + context: url })); } diff --git a/core/server/api/v2/oembed.js b/core/server/api/v2/oembed.js index f321d45c8e..e7dff7cfa5 100644 --- a/core/server/api/v2/oembed.js +++ b/core/server/api/v2/oembed.js @@ -52,7 +52,8 @@ module.exports = { function unknownProvider() { return Promise.reject(new common.errors.ValidationError({ - message: common.i18n.t('errors.api.oembed.unknownProvider') + message: common.i18n.t('errors.api.oembed.unknownProvider'), + context: url })); }