I am implementing error logging in my EmberJS application much as is described here and it's working pretty well. The only part that is throwing me off is how to properly handle error calls from the Ember RSVP onerror
event.
Errors produced from within the Ember run loop are nicely formatted with message
and stack
properties, but errors raised from RSVP give back a standard XHR response and no additional context. Is it possible to access any information about what Ajax call was being executed when this error occurred?
I am using Ember 1.3.1 and Ember Data 1.0.0+b6.
I'm using a dirty workaround to get context from RSVP internals. You can overwrite RVSP.Promise._onerror method and include some data. 'this' object has _label property which contains sometime useful info about model. My solution is still not ideal but it is something.
And little improved code to hook on standart onerror method