diff --git a/construction.go b/construction.go index 9e6d69d..3f8165c 100644 --- a/construction.go +++ b/construction.go @@ -7,6 +7,7 @@ import ( "io/ioutil" "net/http" "net/url" + "os" "regexp" "strconv" "strings" @@ -90,6 +91,10 @@ func addPublicAccess(app *app, houseID, html string) error { data.Set("url", fmt.Sprintf("%s/%s.html", app.cfg.HostName, houseID)) u, err := url.ParseRequestURI(app.cfg.PreviewsHost) + if err != nil { + fmt.Fprintf(os.Stderr, "Error parsing request URI: %v\n", err) + return err + } u.Path = "/" urlStr := fmt.Sprintf("%v", u)