How should errors be handled when using the Ember.js Data RESTAdapter?

前端 未结 4 1293
后悔当初
后悔当初 2020-12-12 14:13

ember-data.js: https://github.com/emberjs/data/tree/0396411e39df96c8506de3182c81414c1d0eb981

In short, when there is an error, I want to display error messages in th

4条回答
  •  不思量自难忘°
    2020-12-12 14:37

    DS.RESTAdapter just got a bit more error handling in this commit but we are still not yet at a point where we have a great recommendation for error handling.

    If you are ambitious/crazy enough to put apps in production today with ember-data (as I have been!), it is best to make sure that the likelihood of failures in your API is extremely low. i.e. validate your data client-side.

    Hopefully, we can update this question with a much better answer in the coming months.

提交回复
热议问题