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" "ArinDash/config"
"encoding/json" "encoding/json"
"io" "io"
"log"
"net/http" "net/http"
"strings" "strings"
"unicode" "unicode"
@@ -83,7 +82,9 @@ func FetchNews() News {
err = json.Unmarshal(respBody, &news) err = json.Unmarshal(respBody, &news)
if err != nil { if err != nil {
log.Fatal(err) return News{
Status: err.Error(),
}
} }
sanitizeNews(&news) sanitizeNews(&news)