elastic-apm-node
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -0,1 +1,4 @@ | ||
# 1.5.3 - 2018/5/14 | ||
* fix: guard against non string err.message | ||
# 1.5.2 - 2018/5/11 | ||
@@ -2,0 +5,0 @@ * fix(express): string errors should not be reported |
@@ -34,3 +34,3 @@ 'use strict' | ||
return function (err, req, res, next) { | ||
if (isError(err) && !err[reportedSymbol]) { | ||
if ((isError(err) || typeof err === 'string') && !err[reportedSymbol]) { | ||
err[reportedSymbol] = true | ||
@@ -37,0 +37,0 @@ agent.captureError(err, { request: req }) |
@@ -44,5 +44,6 @@ 'use strict' | ||
var errorMsg = String(err.message) | ||
var error = { | ||
exception: { | ||
message: String(err.message), | ||
message: errorMsg, | ||
type: String(err.name) | ||
@@ -58,3 +59,3 @@ } | ||
// type (e.g. ER_PARSE_ERROR) | ||
var match = err.message.match(mysqlErrorMsg) | ||
var match = errorMsg.match(mysqlErrorMsg) | ||
if (match) error.exception.code = match[1] | ||
@@ -61,0 +62,0 @@ } |
{ | ||
"name": "elastic-apm-node", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "The official Elastic APM agent for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149439
3675