Skip to content

Commit

Permalink
Remove catch predicate from server/api/canary/tags.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Navarjun committed Jun 7, 2022
1 parent c7f8d2a commit 53629eb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/server/api/canary/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}));
}
});
}
}
Expand Down

0 comments on commit 53629eb

Please sign in to comment.