refactored view package
This commit is contained in:
@@ -34,3 +34,12 @@ func renderSafely(page templ.Component, s *hws.Server, r *http.Request, w http.R
|
||||
throw.InternalServiceError(s, w, r, "Failed to render page", errors.Wrap(err, "page."))
|
||||
}
|
||||
}
|
||||
|
||||
func logError(s *hws.Server, msg string, err error) {
|
||||
s.LogError(hws.HWSError{
|
||||
Message: msg,
|
||||
Error: err,
|
||||
Level: hws.ErrorERROR,
|
||||
StatusCode: http.StatusInternalServerError,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user