Hi,
I’m using smargwt client only. When user trying to login, i’m using RPC call to invoke my server code and checks whehter login success or not. If login is success, in call back’s onSuccess() method, i’m storing the user object and set the DSResponse’s status as STATUS_LOGIN_SUCCESS. But its showing the following error in developer console:
[ERROR] [bdtool] - 12:56:28.409:WARN:RPCManager:Error performing rpcRequest: error: LOGIN_SUCCESS, response: {clientContext: Obj,
status: -8,
data: Array[1],
context: undef,
startRow: 0,
endRow: 0,
totalRows: 0}
When i gone through the API, response status<0 shows as warnings/errors. In API, for STATUS_LOGIN_SUCCESS code is -8.
I think this doesn’t make sense as login succcess a kind of SUCCESS. Putting negative number causing error even it is success. Please correct me if i’m wrong. Check the below code i’m using:
public void onSuccess(User result) {
if(result!=null){
Log.debug("User obj: "+result);
copyValues(result, uRec);
setLoggedInUser(uRec);
ListGridRecord[] list = new ListGridRecord[] { uRec };
response.setData(list);
response.setStatus(DSResponse.STATUS_LOGIN_SUCCESS);
processResponse(requestId, response);
}else{
response.setStatus(DSResponse.STATUS_LOGIN_INCORRECT);
processResponse(requestId, response);
}