kiwiupover/epf_example — pull request #2 by jamesotron (2013-08-19 03:51:26+00:00)
Title: `session.flush` promises should not name the decline argument `response`...

....

So, while reading through the code I noticed that in the
`ContactsNewController` and the `GroupsNewController` you're doing this:

```javascript
save: function() {
var controller = this;
return this.session.flush().then(function(models) {
newContact = controller.get('content');
controller.get('controllers.contacts').content.pushObject(newContact);
controller.transitionToRoute("contact", newContact);
}, function(response){
// TODO add better error message
alert(response);
});
},
```

This seems reasonable, but is slightly misleading. When the decline
action is called the "response" argument doesn't contain a response
object (ie a jqxhr or other representation of the HTTP response)
but contains whatever exception was thrown from within the framework.

I have changed these arguments to be named `exception` to make it
more obvious to the gentle reader that this is what will be passed to
this function when it is called.

I know this seems tiny, but it caused me some confusion :)