mardi 7 juillet 2015

Ember.js: how to analyze error in vendor.js

I've deployed my ember-cli app in stage environment to let teammates test the app. In the app I have implemented Ember.onerror to email me errors that occur in stage and in production environment.

Ember.onerror = function(data) {
    Ember.$.ajax({
      type: "POST",
      url: url + "/error",
      dataType: 'json',
      contentType: 'application/json',
      data: JSON.stringify({message: data.message, stacktrace: data.stack}),
      beforeSend: function (xhr, settings) {
        xhr.setRequestHeader('Accept', settings.accepts.json);
      }
    });
  }

I'm having difficulties in analyze stacktrace because it references only vendor.js and I can't understand where the problem really is.

For example I've received following message:

Message: Nothing handled the action 'back'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.

and stacktrace:

EmberError@http://ift.tt/1eCIVrn 
triggerEvent@http://ift.tt/1eCIVHE 
trigger@http://ift.tt/1HKmDRz 
trigger@http://ift.tt/1eCIUn4 
send@http://ift.tt/1HKmAoX 
send@http://ift.tt/1eCIVHK 
runRegisteredAction@http://ift.tt/1HKmAoZ 
run@http://ift.tt/1eCIUn8 
run@http://ift.tt/1HKmDRF 
handler@http://ift.tt/1eCIUnb 
http://ift.tt/1HKmDRH 
dispatch@http://ift.tt/1HKmAp1 
handle@http://ift.tt/1eCIUng

The meaning of the error message is clear, but I'm wondering if there's a way to easily recognize where that back action is not handled.

Aucun commentaire:

Enregistrer un commentaire