Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2584

Error handler not listened on javascript client

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 0.9.1, 0.9.2
    • Fix Version/s: 0.9.2
    • Component/s: JavaScript - Library
    • Labels:
      None

      Description

      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()
      });

        Attachments

          Activity

            People

            • Assignee:
              codesf Randy Abernethy
              Reporter:
              dpfr David Poulailleau
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: