zfcampus/zf-apigility-admin — pull request #213 by weierophinney (2014-07-24 15:09:28+00:00)
Title: Revise promise chains

- `.then()` statements should not define _both_ a success _and_ an error
handler; in the case of the success handler failing, the error handler will
never be invoked. Additionally, it's considered better to put your error
handlers towards the end of your chain; ideally, use constructs such as
`.catch()` or `.done()`, depending on the promise implementation.
- Since we're using `$q` from angular, altered all promise chains with error
handlers to use `.catch()` to define error handlers.
- Also normalized all promise invocations:
- inline functions are pushed onto the next line
- inline functions never define their name (no longer necessary now that
we're
using `.catch()`

Hoping this will address #175.