@ -137,30 +137,23 @@
this . save ( { sent : true } ) ;
this . save ( { sent : true } ) ;
} . bind ( this ) ) . catch ( function ( errors ) {
} . bind ( this ) ) . catch ( function ( errors ) {
this . save ( { sent : true } ) ;
this . save ( { sent : true } ) ;
if ( errors instanceof Error ) {
if ( ! ( errors instanceof Array ) ) {
errors = [ errors ] ;
errors = [ errors ] ;
}
}
var keyErrors = [ ] ;
errors . forEach ( function ( e ) {
_ . each ( errors , function ( e ) {
console . log ( e ) ;
console . log ( e ) ;
console . log ( e . stack ) ;
console . log ( e . reason , e . stack ) ;
if ( e . error . name === 'OutgoingIdentityKeyError' ) {
keyErrors . push ( e . error ) ;
}
} ) ;
} ) ;
if ( keyErrors . length ) {
message . save ( {
message . save ( { errors : keyErrors } ) ;
errors : errors . filter ( function ( e ) {
} else {
switch ( e . name ) {
if ( ! ( errors instanceof Array ) ) {
case 'OutgoingIdentityKeyError' :
errors = [ errors ] ;
case 'HTTPError' :
}
return true ;
errors . map ( function ( e ) {
if ( e . error && e . error . stack ) {
console . error ( e . error . stack ) ;
}
}
} ) ;
return false ;
throw errors ;
} )
}
} ) ;
} . bind ( this ) ) ;
} . bind ( this ) ) ;
} ,
} ,