> (1) Resource creation or update
> {
> errors: {
> name: [ 'Required field \'name\' was left blank' ],
> date_start: [ 'Required field \'date_start\' was left blank' ]
> }
> }
An interesting idea here is to potentially return the content that
would have been returned by a GET to that (or another) resource,
perhaps with a human-readable error description embedded in a known
location in it. Think of this as an extension of the hypermedia "path"
through the application state. Instead of a dead-end ("400, do not
pass Go"), the client gets "that didn't work and here are some options
for what you may want to do next" (remember to set Content-Location
appropriately).
In the case of a 409 (or potentially 412) error response to an update,
returning the current state of the resource may save network
round-trips, for example.
Jon
........
Jon Moore