Skip to content

Commit

Permalink
fix: fix error return on banner
Browse files Browse the repository at this point in the history
  • Loading branch information
DeboraSerra committed Dec 14, 2024
1 parent e0aee3e commit 7b232c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/src/controllers/banner.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ class BannerController {
const banner = await bannerService.getBannerByUrl(url);
res.status(200).json({ banner });
} catch (error) {
internalServerError("GET_BANNER_BY_URL_ERROR", error.message);
const { payload, statusCode } = internalServerError(
"GET_BANNER_BY_URL_ERROR",
error.message
);
res.status(statusCode).json(payload);
}
}
}
Expand Down

0 comments on commit 7b232c7

Please sign in to comment.