Skip to content

Commit

Permalink
do not print error details to the view
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarprudnikov committed Apr 27, 2024
1 parent 1844551 commit f8d4d36
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ func sendError(ctx context.Context, sess *sessions.Session, w http.ResponseWrite
slog.LogAttrs(ctx, slog.LevelError, "request processing failed", slog.String("message", message), slog.Any("error", err))
apiError := ApiError{
Message: message,
Error: err.Error(),
}
w.WriteHeader(http.StatusBadRequest)
tmpl.ExecuteTemplate(w, "400.tmpl", map[string]interface{}{
Expand Down
1 change: 0 additions & 1 deletion web/400.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<h1>Error</h1>
<p>{{ .error.Message }}</p>
<p>{{ .error.Error }}</p>

{{template "footer.tmpl" .}}
</div>
Expand Down

0 comments on commit f8d4d36

Please sign in to comment.