Results 1 to 5 of 5

Thread: success handler called when service unavailable

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    44

    Default success handler called when service unavailable

    How do people determine if the server is unavailable? I turned off my local server and expected the request to timeout but instead the success handler was called. I'm using the rest proxy.

    Code:
    Ext.create('User').save({
      success: this.successHander,
      failure: this.failureHandler
    }, this);
    This code will trigger the success handler even if the server can not be reached. It also sets record.phantom to false.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    What Sencha Touch 2 version are you using?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    44

    Default

    FINAL

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    44

    Default

    bump. I am using Sencha Touch 2.0 FINAL. Is anyone else having problems with the success handler getting called when it shouldn't?

  5. #5
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693

    Default

    did you tried to listen to the exception event of the proxy?

    http://docs.sencha.com/touch/2-0/#!/...vent-exception

    this event should be fired if your response contains a success = false

Posting Permissions

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