don't crash on news errors

This commit is contained in:
2026-10-04 18:02:59 +02:00
parent e4239c9ffe
commit c7333ecc8d
+3 -2
View File
@@ -4,7 +4,6 @@ import (
"ArinDash/config"
"encoding/json"
"io"
"log"
"net/http"
"strings"
"unicode"
@@ -83,7 +82,9 @@ func FetchNews() News {
err = json.Unmarshal(respBody, &news)
if err != nil {
log.Fatal(err)
return News{
Status: err.Error(),
}
}
sanitizeNews(&news)