add try/catch block

This commit is contained in:
Alex Holliday committed 2026-03-02 18:46:21 +00:00
1 parent c1e03a45b0
commit 64242322a2
1 file changed
+4
@@ -56,6 +56,7 @@ class SettingsController {
};
updateAppSettings = async (req: Request, res: Response, next: NextFunction) => {
try {
updateAppSettingsBodyValidation.parse(req.body);
const updatedSettings = await this.settingsService.updateDbSettings(req.body);
@@ -65,6 +66,9 @@ class SettingsController {
msg: "App settings updated successfully",
data: returnSettings,
});
} catch (error) {
next(error);
}
};
sendTestEmail = async (req: Request, res: Response, next: NextFunction) => {