aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other/EventPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/other/EventPage.js')
-rw-r--r--modern/src/other/EventPage.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modern/src/other/EventPage.js b/modern/src/other/EventPage.js
index 46f5e67c..7bcf90a8 100644
--- a/modern/src/other/EventPage.js
+++ b/modern/src/other/EventPage.js
@@ -37,6 +37,8 @@ const EventPage = () => {
const response = await fetch(`/api/events/${id}`);
if (response.ok) {
setEvent(await response.json());
+ } else {
+ throw Error(await response.text());
}
}
}, [id]);
@@ -49,6 +51,8 @@ const EventPage = () => {
if (positions.length > 0) {
setPosition(positions[0]);
}
+ } else {
+ throw Error(await response.text());
}
}
}, [event]);