aboutsummaryrefslogtreecommitdiff
path: root/pkg/handler/git/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/handler/git/handler.go')
-rw-r--r--pkg/handler/git/handler.go11
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
}