Handle 400 error code when accesing a non public collection

This commit is contained in:
Isaac Wise
2024-07-22 17:39:38 -05:00
parent 2264abd384
commit 1b9dafbe47
2 changed files with 23 additions and 19 deletions
+2
View File
@@ -9,6 +9,8 @@ const getPublicCollectionData = async (
) => {
const res = await fetch("/api/v1/public/collections/" + collectionId);
if (res.status === 400) return { response: "Collection not found.", status: 400 };
const data = await res.json();
setData(data.response);