We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1469b85 commit eef405eCopy full SHA for eef405e
apps/web/pages/reschedule/[uid].tsx
@@ -38,7 +38,19 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
38
},
39
});
40
const dynamicEventSlugRef = booking?.dynamicEventSlugRef || "";
41
- if (!booking?.eventType && !booking?.dynamicEventSlugRef) throw Error("This booking doesn't exists");
+
42
+ if (!booking) {
43
+ return {
44
+ notFound: true,
45
+ };
46
+ }
47
48
+ if (!booking?.eventType && !booking?.dynamicEventSlugRef) {
49
+ // TODO: Show something in UI to let user know that this booking is not rescheduleable.
50
51
52
53
54
55
const eventType = booking.eventType ? booking.eventType : getDefaultEvent(dynamicEventSlugRef);
56
0 commit comments