Stimulus and flash error messages


#1

Hello,

I was migrating most of our apps code to stimulus controllers and got stuck. The problem in question is that we have a form thats being submited via .ajax and if the underlying model is not valid we get a flash message displaying the error. However, after I transfered the code to a stimulus controller using the .ajax everything goes well: we submit the form successfully if the model is valid and get the same responses from the server, BUT there is no flash message shown if the model is not valid. The request header is the same and the message is inside it using both methods, but when we use stimulus its just not showing up on the page. Please share your experiences and ask questions. I will be happy to post code if you need further info.