Although this question was answered, I decided that I shared my experience for future trawlers. Hope this helps.
This happened to me because after the redirect, I did not execute return :
if (test) { flash.message = "Error message." redirect(action: "list") } switch ( params.test ) { case "value": redirect(action: "value", id: callInstance.id, version: callInstance.version)
After the redirect, Grails will continue to move if there is no return . In my case, he got into switch and moved on to the second redirect, in which an error occurred. The code should look like this:
if (test) { flash.message = "Error message." redirect(action: "list") return } switch ( params.test ) { case "value": redirect(action: "value", id: callInstance.id, version: callInstance.version) return
This code was anonymous, of course;)
EDIT
Hey Jize. I just realized that this is Sachin's answer: / Well, I will leave this as an additional example.
source share