After we’ve run the persistence logic - but before we close the
transaction - we check model.errors. If errors are present anywhere in
the graph, we rollback the transaction and return a JSONAPI-compliant Error response:
This is true for nested write operations as well. Let’s say we were
saving an Employee and their Positions in a single request, but one
of the positions had a validation error on a missing title:
This is enough information for a client to apply errors to the relevant
objects. In JSORM’s case, you’d see: