GoogleCloudPlatform / GoogleCloudPlatform/stackdriver-errors-js

Error string normalization

Open
#25 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
360
Forks
54
PR merge metrics
No merged PRs in 30d

Description

I'm not sure if this is within the scope of this project or not. But I did notice that different browsers will have different error strings for the same error. E.g.

`ReferenceError: Can't find variable: errorHandler`
in
`Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.79 Mobile/14A456 Safari/602.1`

vs

`ReferenceError: errorHandler is not defined`
in
`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.70 Safari/537.36 `

The full stack trace isn't the exact same either, just function names differ I think:

```
ReferenceError: errorHandler is not defined
at (https://redditp.com/js/script.js:615)
at Object.success (https://redditp.com/js/EmbedIt.js:94)
at i (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:2)
at Object.fireWith (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:2)
at z (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:4)
at HTMLScriptElement.c (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:4)
at HTMLScriptElement.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:3)
at HTMLScriptElement.r.handle (jquery.min.js:3)
```

vs

```
ReferenceError: Can't find variable: errorHandler
at (https://redditp.com/js/script.js:615)
at success (https://redditp.com/js/EmbedIt.js:94)
at i (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:2)
at fireWith (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:2)
at z (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:4)
at c (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:4)
at dispatch (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:3)
at handle (https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js:3)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.