aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/js/arching-kaos-fetch.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/js/arching-kaos-fetch.js b/src/js/arching-kaos-fetch.js
index a22f9de..a29a5ae 100644
--- a/src/js/arching-kaos-fetch.js
+++ b/src/js/arching-kaos-fetch.js
@@ -18,7 +18,11 @@ function archingKaosFetchJSON( url, callback, params ){
const request = new XMLHttpRequest();
request.addEventListener("load", ()=>{
var json = JSON.parse(request.response);
- callback(json, params);
+ if(request.status !== 404){
+ callback(json, params);
+ } else {
+ archingKaosLog(`ERROR ${request.status} while loading ${url}`);
+ }
});
request.addEventListener("error", ()=>{
console.log("An error occured.");