Any ideas why my .catch won’t work whenever I provide a wrong number (“articlenumber” that doesn’t exist)?
fetch(`/scripts/articles/${articlenumber}.txt`)
.then(response => response.text())
.then(responsearticle => articlecontent.innerHTML = responsearticle)
.catch(function() {
console.log("File not found")
});