Skip to content

Commit

Permalink
fix(error): send stack trace in the raw object
Browse files Browse the repository at this point in the history
  • Loading branch information
gergelyke committed Jan 6, 2016
1 parent 8a284ff commit 80fed8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/providers/httpTransaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ HttpTransaction.prototype.onCrash = function (data) {
data: {
type: 'system',
message: data.stackTrace.message,
raw: data.stackTrace
raw: {
stack: data.stackTrace.stack
}
}
})

Expand Down
10 changes: 5 additions & 5 deletions lib/providers/httpTransaction/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,8 @@ describe('The HttpTransaction module', function () {

it('reports crash', function (done) {
var time = 12345324953
var stackTrace = {
message: 'Not found',
trace: 'error happened at /usr/local/index.js at 123:10'
}
var stackTrace = new Error('Not found')
stackTrace.stack = 'error happened at /usr/local/index.js at 123:10'
var service = 1

var httpTransaction = HttpTransaction.create(eventBus, {})
Expand All @@ -404,7 +402,9 @@ describe('The HttpTransaction module', function () {
expect(result.data).to.be.eql({
type: 'system',
message: stackTrace.message,
raw: stackTrace
raw: {
stack: stackTrace.stack
}
})

done()
Expand Down

0 comments on commit 80fed8b

Please sign in to comment.