Adding more error handling for George's inventory saving problems.

This commit is contained in:
Nick Winter 2014-09-16 15:22:49 -07:00
parent a700b7844f
commit c3573b2fbd

View file

@ -126,7 +126,10 @@ class CocoModel extends Backbone.Model
return unless @notyErrors
errorMessage = "Error saving #{@get('name') ? @type()}"
console.error errorMessage, res.responseJSON
try
noty text: "#{errorMessage}: #{res.status} #{res.statusText}", layout: 'topCenter', type: 'error', killer: false, timeout: 10000
catch notyError
console.error "Couldn't even show noty error for", error, "because", notyError
@trigger 'save', @
return super attrs, options