it will still run on the server, in the same way a api connector request will run on the server regardless of where you invoke it.
you may have an error in the code. the usual hack to debug this is to return also a text value from the action and use it to store error messages that you catch in the code