Pebble App Framework: Phone API
    Preparing search index...

    Function guardRequest

    • Wraps a request so it answers once, and so one that throws answers network error rather than throwing out of the caller.

      Only the first answer goes through. A request that answers twice, or throws and then answers late, has the rest dropped. A throw from the callback itself is the caller's own code failing, so that is thrown on.

      Parameters

      Returns RequestFn

      The same GET, answering once, with a throw read as a request that never reached the host.