浏览代码

Fix incorrect passing of error in HTTP response

Kailash Nadh 6 年之前
父节点
当前提交
5b42e8659f
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      handlers.go

+ 1 - 2
handlers.go

@@ -125,8 +125,7 @@ func handleIndexPage(c echo.Context) error {
 
 	b, err := app.FS.Read("/frontend/index.html")
 	if err != nil {
-		return echo.NewHTTPError(http.StatusInternalServerError,
-			err)
+		return echo.NewHTTPError(http.StatusInternalServerError, err.Error())
 	}
 
 	c.Response().Header().Set("Content-Type", "text/html")