From 71a6795fce0ce50a46f1af94a120e47840144ebf Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Tue, 17 Aug 2021 19:42:11 +0200 Subject: [PATCH] Comments --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index c1481bb..ccaf5ea 100644 --- a/main.js +++ b/main.js @@ -58,6 +58,10 @@ function createUrl() { document.getElementById("error_dismiss").onclick = () =>{ document.getElementById("error_container").classList.add("hidden"); }; +/** + * Display alerts for errors (only handling 400 correctly r/n) + * @param {response} res The fetch response object + */ function handleError(res) { if (res.status == 400) { res.text().then((body)=>{