Added 404 handling for edit Offer

no-issue

This was also missing as part of the Offers API.
This commit is contained in:
Fabien O'Carroll 2021-10-22 14:45:37 +02:00
parent a6982d5606
commit 696d8e3c49

View File

@ -50,6 +50,13 @@ module.exports = {
...frame.data.offers[0],
id: frame.options.id
});
if (!offer) {
throw new errors.NotFoundError({
message: tpl(messages.offerNotFound)
});
}
frame.response = {
offers: [offer]
};