🐛 Fixed NotFound error for entry in multilingual mode
This commit is contained in:
parent
b623527ff5
commit
40c3565173
|
@ -190,11 +190,13 @@ func NewApp(logger *log.Logger, config *domain.Config) (*App, error) {
|
||||||
// code in subdir.
|
// code in subdir.
|
||||||
e, err := entrier.Do(r.Context(), lang, tail)
|
e, err := entrier.Do(r.Context(), lang, tail)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !errors.Is(err, entry.ErrNotExist) {
|
if errors.Is(err, entry.ErrNotExist) {
|
||||||
|
http.NotFound(w, r)
|
||||||
|
} else {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(toby3d): wrap founded entry into theme template and
|
// NOTE(toby3d): wrap founded entry into theme template and
|
||||||
|
|
Loading…
Reference in New Issue