Results 1 to 4 of 4

Thread: Bug in ZmCsfeAsynchCommand

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Switzerland
    Posts
    54
    Rep Power
    10

    Default Bug in ZmCsfeAsynchCommand

    Might have found a tiny bug in the ZmCsfeAsynchCommand class.

    Method: ZmCsfeAsynchCommand.prototype.rpcCallback, starting at ligne 106

    I simply had to add the following 2 lines in order to make the function correctly behave:
    this._fireInvokeEvent(newEx); // at line 161
    return;

    After some debugging, I noticed I was getting an Exception in that block but it was then not passed to the listener. I noticed that the Exception was thrown but that it was actually overriden in the following block by another exception, since you use a single variable newEx in your code:

    try {
    //check if we received a Fault message from server
    var fault = AjxSoapDoc.element2FaultObj(this._responseSoapDoc. getBody());
    if (fault) {
    newEx = new ZmCsfeException("Csfe service error", fault.errorCode, "ZmCsfeAsynchCommand.prototype.rpcCallback", fault.reason);
    }
    } catch (ex) {
    newEx = ex;
    }


    In other words, if you get 2 Exceptions, the first one will never get to the application level. FYI, I was getting an Exception because the server was not sending back XML, but the content-type of the response was set to XML. So, if you check the above block, if there was an error parsing the response, variable this._responseSoapDoc will not be defined, and that is were the second exception was occuring.

    Anyway, why not stop the execution of this method at the first exception ?

    Heladito

  2. #2
    Join Date
    Oct 2005
    Location
    Urmond, Netherlands
    Posts
    51
    Rep Power
    10

    Default

    You are completely right.

    I noticed also that the method doesn't parse JSON. But that is because it maybe isn't needed in ZimbraClient.

  3. #3
    Join Date
    Aug 2005
    Posts
    49
    Rep Power
    10

    Default

    There has been a bunch of work done around the asynchronous code in our next release (which will be available *very* soon)

  4. #4
    Join Date
    Sep 2005
    Location
    Tucson - San Francisco - Moscow
    Posts
    127
    Rep Power
    10

    Default

    I wil take a look at this problem. It is true that this class is not used in mail client. It is used only in the Admin client, which currently is mostly using SOAP. Most likely this class will go away once we finish switching the Admin client to JSON.

Similar Threads

  1. Help us fix Bug 14945 :)
    By jholder in forum Administrators
    Replies: 32
    Last Post: 09-25-2007, 09:24 PM
  2. Backups fail after workaround for bug 10827
    By warbirdcharles in forum Administrators
    Replies: 1
    Last Post: 07-17-2007, 12:07 PM
  3. will be the accent char bug fixed anytime soon?
    By lfarkas in forum Developers
    Replies: 1
    Last Post: 05-15-2006, 03:19 AM
  4. serious IMAP download bug (6326)
    By ericding in forum Developers
    Replies: 5
    Last Post: 04-05-2006, 10:34 AM
  5. i18n, bug 5912 and other considerations
    By Kafka in forum I18N/L10N - Translations
    Replies: 9
    Last Post: 02-22-2006, 03:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •