add error when patching failed

This commit is contained in:
Thomas Ruoff
2022-03-17 23:22:58 +01:00
parent d9cd2af314
commit 7697ee80ca

View File

@@ -34,6 +34,7 @@ export default async function userHandler(
const booking = await patchBooking(uuid, req.body); const booking = await patchBooking(uuid, req.body);
res.status(200).json(booking) res.status(200).json(booking)
} catch (error) { } catch (error) {
console.error('failed patch booking', error);
res.status(400).end(`Failed to save booking: ${error.message}`) res.status(400).end(`Failed to save booking: ${error.message}`)
} }
break break