appview: strings: return 404 page if string wasnt found #430

merged
opened by ptr.pet targeting master from ptr.pet/core: strings-404
Changed files
+5
appview
strings
+5
appview/strings/strings.go
···
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)