Hi,
Sometimes I dont't get notifications about failed DSRequests.
Here is an example:
I. The client is sending the DSRequest like this:
(Where saveReturned is a DSCallback.)
II. The client sends this request:
III. The server executes the operation binding, and (for some reason) the action fails. Server executes this:
IV. The client receives this DSResponse:
V. The followin appears on dev console log:
This is all right, but at this point, the specified DSCallback is not called. (Nor is any error message displayed.)
* * *
If I understand this right, I can choose from two error handling modes:
- By default, the central framework will handle errors. This means that in case of errors, RPCManager is supposed to show an error message for me, and my DSCallback is not called. This works fine when there is an error message, but when there is none (like in the example), it just swallows the error.
- The other option is to specify willHandleError="true" on my request. In this case I will get no error message, but my DSCallback will be called in case of errors, too. This option works fine.
So, to wrap this up, the problem here seems to be the RPCManager does not show any error message when there is no message returned with the failed DSResponse. Is that intended?
Thank you for your help:
Csillag
Sometimes I dont't get notifications about failed DSRequests.
Here is an example:
I. The client is sending the DSRequest like this:
Code:
form.submit(saveReturned, new DSRequest() {{ setOperationId("registerUser"); }});
II. The client sends this request:
Code:
{ "dataSource":"app_users_auto", "operationType":"add", "operationId":"registerUser", "componentId":"isc_DynamicForm_0", "data":{ "USER_LOGIN":"cs2", "USER_NAME":"Cs 3 ", "USER_EMAIL":"cs3@a.com" }, "callback":{ "target":[DynamicForm ID:isc_DynamicForm_0], "methodName":"saveEditorReply" }, "showPrompt":true, "prompt":"Saving form...", "oldValues":{ }, "clientContext":{ }, "requestId":"app_users_auto$6272" }
Code:
return new DSResponse(DSResponse.STATUS_FAILURE);
Code:
[ { queueStatus:-1, isDSResponse:true, invalidateCache:false, status:-1, data:null } ]
Code:
14:53:18.266:XRP1:WARN:RPCManager:Error performing operation: 'registerUser': error: FAILURE, response: {operationId: "registerUser", clientContext: Obj, context: Obj, transactionNum: 5, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{queueStatus:-..."[123], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, queueStatus: -1, isDSResponse: true, invalidateCache: false, data: null, startRow: 0, endRow: 0, totalRows: 0}
* * *
If I understand this right, I can choose from two error handling modes:
- By default, the central framework will handle errors. This means that in case of errors, RPCManager is supposed to show an error message for me, and my DSCallback is not called. This works fine when there is an error message, but when there is none (like in the example), it just swallows the error.
- The other option is to specify willHandleError="true" on my request. In this case I will get no error message, but my DSCallback will be called in case of errors, too. This option works fine.
So, to wrap this up, the problem here seems to be the RPCManager does not show any error message when there is no message returned with the failed DSResponse. Is that intended?
Thank you for your help:
Csillag
Comment