From c704e1ccfcac9e462211208809b7daa8a793d21a Mon Sep 17 00:00:00 2001 From: dusk Date: Sat, 9 Aug 2025 14:55:25 +0300 Subject: [PATCH] appview: strings: return 404 page if string wasnt found Signed-off-by: dusk --- appview/strings/strings.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appview/strings/strings.go b/appview/strings/strings.go index 130329f..8855a04 100644 --- a/appview/strings/strings.go +++ b/appview/strings/strings.go @@ -99,6 +99,11 @@ func (s *Strings) contents(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusInternalServerError) return } + if len(strings) < 1 { + l.Error("string not found") + s.Pages.Error404(w) + return + } if len(strings) != 1 { l.Error("incorrect number of records returned", "len(strings)", len(strings)) w.WriteHeader(http.StatusInternalServerError) -- 2.43.0