exception not called when login fail

0 votes

Hi, 

first, thanks for making this great app42 and appwarp service.

I have a problem with login with app42 in unity. I got this code from tutorial:

 

public void login(string username,string password){
loginCallBack lc = new loginCallBack();
userService.Authenticate(username, password,lc); 
}
public class loginCallBack : App42CallBack
{  
public void OnSuccess(object response)  
{  
User user = (User) response;       
App42Log.Console("userName is " + user.GetUserName());  
App42Log.Console("sessionId is " + user.GetSessionId());  
}  
public void OnException(Exception e)  
{  
App42Log.Console("Exception : " + e);  
}  
}

 

But, it seems that the OnException is never called even if I give wrong password or I cut the connection.. how do I detect that user give a wrong password or connection not available? am I doing something wrong?

 

 

thanks

 

Wahyu

asked May 27, 2015 in App42 Cloud API-BaaS by a.in18dec (11 points)

1 Answer

+1 vote
Hello Wahyu,

Thanks for your valauable feedback. Could you please put the below line of code before making an authenticate call and share the app logs with us. It will help us to debug the root cause of this issue.

App42Log.SetDebug(true);

Thanks,

Himanshu Sharma
answered May 27, 2015 by hs00105 (2,005 points)
Hi Himanshu Sharma,

first, sorry for late answer..
and sorry for ask that stupid things..
I didn't know if App42Log.console only work when App42Log.SetDebug(true) was called.
that's why the console does not tell me anything.

thanks so much for your answer.


fyi: my code is not exactly the save as above,
in my code when login success, it will redirect me to another scene (no console debug), but when login failed, I debug it on console (just for testing purpose).

sorry (again), for this stupid mistake.. haha
Great to hear that you are able to see the error logs. Let me know if you face any issue. It will help us to provide better support from our side.

Thanks,
Himanshu Sharma
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
...