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
This commit is contained in:
Hannah Wolfe 2019-06-13 10:56:54 +01:00
parent bbae006eb5
commit d1e3205569
2 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,8 @@ const oembed = {
function unknownProvider() { function unknownProvider() {
return Promise.reject(new common.errors.ValidationError({ 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
})); }));
} }

View File

@ -52,7 +52,8 @@ module.exports = {
function unknownProvider() { function unknownProvider() {
return Promise.reject(new common.errors.ValidationError({ 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
})); }));
} }