aboutsummaryrefslogtreecommitdiff
path: root/pkg/handler/error.go
blob: f74be5912a71b78e4dd8912dba53cf9a316fdfe3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package handler

import (
	"log"

	"github.com/labstack/echo/v4"
	"sh.org.ru/pkg/tpl"
)

func ErrorHandler(err error, c echo.Context) {
	if err := tpl.ErrorPage(err.Error()).Render(c.Request().Context(), c.Response()); err != nil {
		log.Println(err)
	}
}