Tapestry 5
  1. Tapestry 5
  2. TAP5-1106

Tapestry.ajaxFailureHandler has an incorrect signature for an Ajax.Request onException callback

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.0, 5.1.0.5
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      From the Prototype Ajax documentation ( http://api.prototypejs.org/ajax/ ):

      "onException: Triggered whenever an XHR error arises. Has a custom signature: the first argument is the requester (i.e. an Ajax.Request instance), and the second is the exception object."

      All other callbacks "are invoked with two parameters: the Ajax.Response object and the result of evaluating the X-JSON response header, if any (can be null)."

        Activity

        Hide
        Leonard Lu added a comment -

        onException takes an Ajax.Request instance as its first parameter, not Ajax.Response, therefore line 327 of tapestry.js:
        Tapestry.debug(Tapestry.Messages.ajaxFailure + exception, response);

        will result in the cryptic message "Ajax failure: Status for : [object Object]"

        Show
        Leonard Lu added a comment - onException takes an Ajax.Request instance as its first parameter, not Ajax.Response, therefore line 327 of tapestry.js: Tapestry.debug(Tapestry.Messages.ajaxFailure + exception, response); will result in the cryptic message "Ajax failure: Status for : [object Object] "

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Leonard Lu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development