Skip to content

Instantly share code, notes, and snippets.

@Chandler
Last active December 22, 2015 08:18
Show Gist options
  • Save Chandler/6443730 to your computer and use it in GitHub Desktop.
Save Chandler/6443730 to your computer and use it in GitHub Desktop.
record = @get('model').createRecord(properties)
@get('store').get('defaultTransaction').commit()
record.on 'becameError', =>
@set 'errors', 'SERVER ERROR'
record.on 'becameInvalid', =>
@set 'errors', 'SERVER ERROR'
console:
POST http://localhost:9000/api/users 422 (status code 422)
Uncaught Invalid JSON format
becameError or becameInvalid are never called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment