Next.js Discord

Discord Forum

how to get costom error message in production

Unanswered
Siamese posted this in #help-forum
Open in Discord
SiameseOP
when user login and password does not match, throw an error "invalid password".
it's working fine in developement but not in production. i got a meesage that the error message is blocked. i want to be able to show users reasons why they can not log in.

5 Replies

@Siamese when user login and password does not match, throw an error "invalid password". it's working fine in developement but not in production. i got a meesage that the error message is blocked. i want to be able to show users reasons why they can not log in.
the error is ommited for security reasons in production. You would like to want to invest some time in a correct error logging solution. Either build it on your own, or use libraries for that.

I like to use next-safe-actions. The build a pretty nice error handling solution for server actions. You might want to take a look at: https://next-safe-action.dev/
@Siamese solved?
SiameseOP
not at all, could not open the link you sent
@Siamese why not?