Skip to content

Commit

Permalink
Print create user error backtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
hiveer committed Sep 25, 2024
1 parent bd83cf6 commit 0cf2c02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/handlers/render/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func (i *SessionHandlerImpl) Create(ctx *gin.Context) {

err = i.userModel.Create(ctx, user)
if err != nil {
slog.Error("Login Error", "error", "create user failed", slog.Any("error", err), "uuid", userResp.UUID)
stackTrace := string(debug.Stack())
slog.Error("Login Error", "error", "create user failed", slog.Any("error", err), "uuid", userResp.UUID, "stack", stackTrace)
ctx.Redirect(http.StatusFound, "/errors/login-failed")
return
}
Expand Down

0 comments on commit 0cf2c02

Please sign in to comment.