This project is archived and is in readonly mode.

#458 ✓wontfix
digitarald

Request does not callChain onFailure

Reported by digitarald | November 5th, 2008 @ 08:37 AM | in 2.0 (closed)

Chained calls currently break when a request fails, which is unexpected behaviour.

onFailure in Request.js has no callChain(); after firing the events, only onSuccess has it.

Same for cancel, it only cancels the running request but does not call the next chain. Those 2 missing calls are especially relevant if you use the option "link=chain", which implies that a completed request starts the next one.

Fix is simple, therefore no patch attached. Fix does also not change any existing specs.

Comments and changes to this ticket

  • Jan Kassens

    Jan Kassens November 5th, 2008 @ 08:41 AM

    • State changed from “new” to “hold”

    I agree that callChain should be called on complete not on success.

    What's the expected behaviour for .cancel? It could cancel the current Request and .callChain() or cancel the Request and empty the chain. I dont think introducing a argument for cancel to specify that would be a good idea. callChain(true) <- also clear the chain.

  • digitarald

    digitarald November 6th, 2008 @ 08:11 AM

    • Tag changed from chain, request, simple to chain, patch, request, simple

    Patch: http://github.com/digitarald/moo...

    Cancel stops the request only when its running, chain chould be called (since the request is stopped and the next step can go on. If you want to cancel and stop all chains you can use clearChain().cancel().

    The specs of cancel are, that it cancels the current request, it should NOT affect the chained functions.

  • Christoph Pojer

    Christoph Pojer November 9th, 2010 @ 07:25 PM

    • State changed from “hold” to “wontfix”
    • Milestone order changed from “0” to “0”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages