diff --git a/core/server/api/canary/tags.js b/core/server/api/canary/tags.js index 2de713c0d8b..8c284bf0b22 100644 --- a/core/server/api/canary/tags.js +++ b/core/server/api/canary/tags.js @@ -149,10 +149,12 @@ module.exports = { query(frame) { return models.Tag.destroy(frame.options) .then(() => null) - .catch(models.Tag.NotFoundError, () => { - return Promise.reject(new errors.NotFoundError({ - message: tpl(messages.tagNotFound) - })); + .catch((e) => { + if (e instanceof models.Tag.NotFoundError) { + return Promise.reject(new errors.NotFoundError({ + message: tpl(messages.tagNotFound) + })); + } }); } }