Open buren opened 8 years ago
First of all thank you for this package :+1: :star:
This is by no means ready.. Just thought it could act as a starting point for discussing how errors could be handled.
With this approach every time a POST or PATCH response it synced the consumer must write something like this..
POST
PATCH
var article = store.sync(payload); if (article.errors) { // error handling } else { // handle successful response }
@beauby what do you think? Should errors be handled in some other way?
Hi @buren – sorry for the super-long delay. I really like the idea, although the API would have to be a bit different as the spec does not, AFAIK, forbid a field to be named errors, which would create a name clash.
errors
First of all thank you for this package :+1: :star:
This is by no means ready.. Just thought it could act as a starting point for discussing how errors could be handled.
With this approach every time a
POST
orPATCH
response it synced the consumer must write something like this..@beauby what do you think? Should errors be handled in some other way?