[
https://issues.apache.org/jira/browse/THRIFT-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038894#comment-14038894
]
ASF GitHub Bot commented on THRIFT-2584:
----------------------------------------
GitHub user poudaLab opened a pull request:
https://github.com/apache/thrift/pull/143
adding ajax error handling
This issue is linked with THRIFT-2584
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/poudaLab/thrift master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/143.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #143
----
commit 48503e2ff906d54bc5c4aee55361881dbe56342f
Author: poudaLab <[email protected]>
Date: 2014-06-20T15:12:28Z
adding ajax error handling
----
> Error handler not listened on javascript client
> -----------------------------------------------
>
> Key: THRIFT-2584
> URL: https://issues.apache.org/jira/browse/THRIFT-2584
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Affects Versions: 0.9.1, 0.9.2
> Reporter: David Poulailleau
>
> jQuery's error are not handled in the ajax call. This causes the callback not
> to be called when an error happened during a server call.
> In library, the ajax call looks like this :
> var jqXHR = jQuery.ajax({
> url: this.url,
> data: postData,
> type: 'POST',
> cache: false,
> contentType: 'application/json',
> dataType: 'text thrift',
> converters: {
> 'text thrift' : function(responseData) {
> thriftTransport.setRecvBuffer(responseData);
> var value = recv_method.call(client);
> return value;
> }
> },
> context: client,
> success: jQuery.makeArray(args).pop()
> });
> Setting object should have an error key, something like this :
> var jqXHR = jQuery.ajax({
> url: this.url,
> data: postData,
> type: 'POST',
> cache: false,
> contentType: 'application/json',
> dataType: 'text thrift',
> converters: {
> 'text thrift' : function(responseData) {
> thriftTransport.setRecvBuffer(responseData);
> var value = recv_method.call(client);
> return value;
> }
> },
> context: client,
> success: jQuery.makeArray(args).pop(),
> error: jQuery.makeArray(args).pop()
> });
--
This message was sent by Atlassian JIRA
(v6.2#6252)