Fix error rendering
This commit is contained in:
parent
642e7785a1
commit
26485a2307
|
@ -38,6 +38,10 @@ func httpErrorHandler(sc context.Context) echo.HTTPErrorHandler {
|
|||
code = http.StatusInternalServerError
|
||||
}
|
||||
|
||||
// make sure that HTMX selects and targets correct element
|
||||
c.Response().Header().Add("HX-Retarget", "#content")
|
||||
c.Response().Header().Add("HX-Reselect", "#content")
|
||||
|
||||
if err = c.HTML(code, buf.String()); err != nil {
|
||||
c.Logger().Error(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue