Sc_error_message does not display message in onvalidate event on form in the prod environment

Anyone knows what could be wrong here. It works in the development environment. Am I missing something?

removed sc_error_exit after sc_error_message in the onvalidate event and it worked.