Skip to content

Server 422s invalidate saving models. #228

wants to merge 1 commit into from

4 participants

Ember.js member
hjdivad commented Apr 25, 2012

This is a subset of PR #87 restricted to handling 422s.

  • handles createRecord and updateRecord. Multirecord case is more complicated because of mapping errors to records.
@hjdivad hjdivad Server 422s invalidate saving models.
- handles `createRecord` and `updateRecord`.  Multirecord case is more
  complicated because of mapping errors to records.
Ember.js member
mixonic commented May 10, 2012

I like it. It's making my life pleasant until server-side errors make it into the errors object in #181.


Hi. After the record was marked invalid, how to recommit the transaction?

Ember.js member

@alexdinu08 The next time you set a property on the record it should transition from the invalid state. Alternatively you can do this manually if you know the record is in an invalid state with record.send("becameValid");

@hjdivad thanks! record.send("becameValid"); worked

@hjdivad the problem is when the record to be saved hasMany objects. when editing the hasMany objects, ember-data will give an error: "...could not respond to event setProperty in state rootState.loaded.created.pending.committing."

Ember.js member

@alexdinu08 do you have a jsFiddle or jsbin example?

Ember.js member
machty commented Oct 1, 2012

what's the status on this? would be nice to have. what's the alternative in the meantime?

Ember.js member
hjdivad commented Jan 3, 2013

superseded by #476.

@hjdivad hjdivad closed this Jan 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.