Added error to post page

This commit is contained in:
2025-10-31 10:34:09 -05:00
parent e8b64b93e1
commit 0587616523

View File

@ -19,7 +19,14 @@ fetch("/pages/blog/"+search+".json").then(response => response.json()).then(data
postBody.innerHTML = data.postText; postBody.innerHTML = data.postText;
} }
}).catch(error => console.error("Error Fetching Json")); }).catch((error) => {
postTitle = document.getElementById("postTitle");
postSubTitle = document.getElementById("postSubTitle");
postText = document.getElementById("postText");
postTitle.textContent = "Error fetching post";
postSubTitle.textContent = "What happened?"
postText.textContent = "You were trying to look for " + document.location.search + " Is this correct?"
});