File tree 2 files changed +22
-2
lines changed 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -1141,8 +1141,6 @@ Raven.prototype = {
1141
1141
for ( var j = 0 ; j < options . trimHeadFrames && j < frames . length ; j ++ ) {
1142
1142
frames [ j ] . in_app = false ;
1143
1143
}
1144
- // ... delete to prevent from appearing in outbound payload
1145
- delete options . trimHeadFrames ;
1146
1144
}
1147
1145
}
1148
1146
frames = frames . slice ( 0 , this . _globalOptions . stackTraceLimit ) ;
@@ -1263,6 +1261,9 @@ Raven.prototype = {
1263
1261
baseData . request = httpData ;
1264
1262
}
1265
1263
1264
+ // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
1265
+ if ( data . trimHeadFrames ) delete data . trimHeadFrames ;
1266
+
1266
1267
data = objectMerge ( baseData , data ) ;
1267
1268
1268
1269
// Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
Original file line number Diff line number Diff line change @@ -79,6 +79,25 @@ describe('integration', function () {
79
79
) ;
80
80
} ) ;
81
81
82
+ it ( 'should generate a synthetic trace for captureException w/ non-errors' , function ( done ) {
83
+ var iframe = this . iframe ;
84
+ iframeExecute ( iframe , done ,
85
+ function ( ) {
86
+ setTimeout ( done ) ;
87
+
88
+
89
+ Raven . captureException ( { foo :'bar' } ) ;
90
+ } ,
91
+ function ( ) {
92
+ var ravenData = iframe . contentWindow . ravenData [ 0 ] ;
93
+ assert . isAbove ( ravenData . stacktrace . frames . length , 1 ) ;
94
+
95
+ // verify trimHeadFrames hasn't slipped into final payload
96
+ assert . isUndefined ( ravenData . trimHeadFrames ) ;
97
+ }
98
+ ) ;
99
+ } ) ;
100
+
82
101
it ( 'should capture an Error object passed to Raven.captureException w/ maxMessageLength set (#647)' , function ( done ) {
83
102
var iframe = this . iframe ;
84
103
iframeExecute ( iframe , done ,
You can’t perform that action at this time.
0 commit comments