Internal exception instead of callback exception on UserServices API call

0 votes
I authenticated the application and wanted to call UserServices.GetUserByEmailId() but when using an invalid e-mail (accidentally typed user#host.com instead of user@host.com) it triggers an internal exception, instead of my c# callback exception. I expected my callback to capture the exception so I can treat it. The current design seems to trigger the termination of my Editor app (I mean it stops playing, not that it crashes :) ) so I expect the same to happen in a standalone build. I don't think mistyping an emailaddress in a textbox should cause this. Is this by design? Cause I don't think it is a good way. I expect my callback to capture everything sent by the App42 Cloud API. Can you please check?
asked Jul 11 in Unity by xian_ef (35 points)
edited Jul 11 by xian_ef

1 Answer

0 votes
 
Best answer
Hi Xian,

As per the current implementation of the SDK, it checks the bad parameter related problems locally and throws exceptions. You have to use try - cache to catch the exception and handle it there. The exceptions raised by the server will be provided in onException callback.

I hope it helps.

Thanks.
answered Jul 13 by rajeev.etc (1,640 points)
selected Jul 16 by xian_ef
Yeah I already used try/catch, but I thought it is a bug. So this is the intended mechanism. Thanks for the clarification, however, I recommend adding this info in the documentation. It isn't really straightforward and the only reason I guessed how was trial & error while also assuming it's a bug :)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...