diff options
-rw-r--r-- | pkg/handler/git/handler.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/handler/git/handler.go b/pkg/handler/git/handler.go index 4c5d198..0963033 100644 --- a/pkg/handler/git/handler.go +++ b/pkg/handler/git/handler.go @@ -2,6 +2,7 @@ package git import ( "bytes" + "errors" "fmt" "io" "log/slog" @@ -160,6 +161,16 @@ func (g *GitHandler) About(w http.ResponseWriter, r *http.Request) error { } file, err := g.gitService.GetAbout(name) + if errors.Is(err, object.ErrFileNotFound) { + templates.WritePageTemplate(w, &templates.GitItemPage{ + Name: name, + Ref: ref.Name().Short(), + GitItemBase: &templates.GitItemAboutPage{ + About: []byte("About file not configured properly"), + }, + }) + return nil + } if err != nil { return err } |