when using ember-data, where does ember convert a save error (422 response from server) to the errors object that gets passed to the error callback?
i have a multiuser app, so i have validation setup to check if data is 'stale', that is, whenever i update, i also send the user's previously known value, and on the server, i load the latest data from the database, and check if the user's previous value matches the database's current value
if it doesnt match, this indicates another user has changed this field, and i return an error
kiddesr has quit
however, i also want to return the correct updated data, and store.pushPayload it on the client so that the client's previous values are no longer stale
i can see my additional data in the error response json, but when it gets passed as the errors param to the callback, only errors.errors is present, not any of my custom json
the response i get is: {"store":{"subprocess":{"id":26,"process_id":11,"uid":"1a","name":"Control Environment","created_at":"2014-09-22T19:53:04.431Z","updated_at":"2015-08-02T07:57:29.630Z","deleted_at":null,"subprocesses_datum_ids":[29,70,72],"risk_ids":[],"control_ids":[80,82,83,86,79,76,81,84,78,77,132,133,85]}},"errors":{"uid":["Save failed! Another user has modified this field."]}}
but in the errors callback, that entire store.subprocess portion is gone
ur5us joined the channel
kiddesr joined the channel
jlle1 joined the channel
slik joined the channel
JimboSlice joined the channel
juanpablo_______ joined the channel
well, i worked around that, but seems ember doesn't like pushpayload when record is currently marked invalid
Attempted to handle event `pushedData` on <soxhub-client@model:subprocess::ember1164:26> while in state root.loaded.updated.invalid.
juanpablo_______ has quit
Gandalfar has quit
Taftse|Mac joined the channel
nice, seems all i needed was a model.rollback() first