Can use these 2 actions, it will be similar when you want to end the thread.
But in this case, this is a bug with the site. So you can use Fail to give an error message. This action will end the current thread.
In case anyone else encountered this problem. You have to edit your function and check the "has return value" box. Then your return will work. After this you have to use "Call Function" again and now you have a new field for saving results.