-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core(errors-in-console): If exception info is not present use exception text #4191
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for quickly fixing @wardpeet! did you get a repro on that URL mentioned in the issue/sentry and this returns a real message in that case?
assert.equal(auditResult.details.items.length, 1); | ||
// url is undefined | ||
assert.strictEqual(auditResult.details.items[0][0].text, 'http://example.com/fancybox.js'); | ||
// text is undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what these two comments are, isn't text
defined here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I did, it happens when a syntax error occurred on the page.
{
"timestamp":1515451440948.461,
"exceptionDetails":{
"exceptionId":1,
"text":"Uncaught SyntaxError: Unexpected token ,",
"lineNumber":3180,
"columnNumber":302,
"scriptId":"56",
"url":"https://enterprise.efax.com/",
"stackTrace":{
"callFrames":[
{
"functionName":"prop",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":22254
},
{
"functionName":"access",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":6743
},
{
"functionName":"prop",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":18120
},
{
"functionName":"",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":88,
"columnNumber":274
},
{
"functionName":"each",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":5254
},
{
"functionName":"each",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":2010
},
{
"functionName":"b",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":88,
"columnNumber":190
},
{
"functionName":"",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":89,
"columnNumber":472
},
{
"functionName":"c",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":7854
},
{
"functionName":"fireWith",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":8655
},
{
"functionName":"ready",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":3263
},
{
"functionName":"H",
"scriptId":"32",
"url":"https://d9jmv9u00p0mv.cloudfront.net/js/10015692-10015098.js",
"lineNumber":8,
"columnNumber":692
}
]
}
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome thanks @wardpeet! 👍
Fixes #4188
when looking at the devtools protocol. Exeption is an optional property, when not present we should use text.
I also added an extra test to cover this case.