# Failed to call custom RPC that exists in nakama panel

**URL:** <https://forum.heroiclabs.com/t/failed-to-call-custom-rpc-that-exists-in-nakama-panel/3706>\
**Category:** Runtime Framework\
**Tags:** server-framework, lua\
**Created:** [March 28, 2023, 6:53pm UTC](https://forum.heroiclabs.com/t/failed-to-call-custom-rpc-that-exists-in-nakama-panel/3706 "2023-03-28T18:53:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergisnt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sergisnt/32/1377_2.png) [@sergisnt](https://forum.heroiclabs.com/u/sergisnt)\
**Post date:** [March 28, 2023, 6:53pm UTC](https://forum.heroiclabs.com/t/failed-to-call-custom-rpc-that-exists-in-nakama-panel/3706/1 "2023-03-28T18:53:07Z")

</div>

I have created a new function in lua on the nakama server. And it works correctly when I run it there. But when I try to call it from my Godot 4 code. It gives me this error. I’ve tried several things but can’t get it to work. Attached images.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/9/9097a13bc18184658702bf6873059a6658c2be36.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/9/9130da09a7ec4e30c08322c78efdbd7d2bec5616.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/7/7f0d88c146d271a6454f2e7675217cf834ce4507.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/d/de698b9ea29745db1112685b1d40171eeb53830e.png)

---

<div class="post-metadata">

**Author:** ![tom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/tom/32/676_2.png) [@tom](https://forum.heroiclabs.com/u/tom)\
**Post date:** [March 29, 2023, 9:00am UTC](https://forum.heroiclabs.com/t/failed-to-call-custom-rpc-that-exists-in-nakama-panel/3706/2 "2023-03-29T09:00:41Z")

</div>

I’m not seeing any errors in the logs there, those are just debug statements likely telling you that the HTTP request is being freed.

Are you seeing the correct log entries in the Nakama server output (e.g. `rpcReward resp:...)`?

It doesn’t look like you’re returning the `wallet` object from the `get_wallet_async()` call.

---

<div class="post-metadata">

**Author:** ![sergisnt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sergisnt/32/1377_2.png) [@sergisnt](https://forum.heroiclabs.com/u/sergisnt)\
**Post date:** [March 29, 2023, 3:38pm UTC](https://forum.heroiclabs.com/t/failed-to-call-custom-rpc-that-exists-in-nakama-panel/3706/3 "2023-03-29T15:38:30Z")

</div>

TRUE! the problem was that the code in the runtime file was wrong. I did not have the return with the object correctly. Thanks!
