diff options
Diffstat (limited to 'web/command/handler/site.go')
| -rw-r--r-- | web/command/handler/site.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/web/command/handler/site.go b/web/command/handler/site.go index 73ea1a0..ab1d8e5 100644 --- a/web/command/handler/site.go +++ b/web/command/handler/site.go @@ -1,7 +1,6 @@ package handler import ( - "fmt" "net/http" "github.com/LMBishop/scrapbook/pkg/config" @@ -15,11 +14,11 @@ func GetSite(mainConfig *config.MainConfig, index *index.SiteIndex) func(http.Re return ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (Node, error) { siteName := r.PathValue("site") if siteName == "" { - return nil, fmt.Errorf("unknown site") + return html.ErrorPage("Unknown site: " + siteName), nil } site := index.GetSite(siteName) if site == nil { - return nil, fmt.Errorf("unknown site") + return html.ErrorPage("Unknown site: " + siteName), nil } return html.SitePage(mainConfig, site), nil |
