aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/components/LinkField.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/common/components/LinkField.js')
-rw-r--r--modern/src/common/components/LinkField.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modern/src/common/components/LinkField.js b/modern/src/common/components/LinkField.js
index e11438df..0f6cc7ba 100644
--- a/modern/src/common/components/LinkField.js
+++ b/modern/src/common/components/LinkField.js
@@ -23,6 +23,8 @@ const LinkField = ({
const response = await fetch(endpointAll);
if (response.ok) {
setItems(await response.json());
+ } else {
+ throw Error(await response.text());
}
}, []);
@@ -31,6 +33,8 @@ const LinkField = ({
if (response.ok) {
const data = await response.json();
setLinked(data.map((it) => it.id));
+ } else {
+ throw Error(await response.text());
}
}, []);