Updated FAQ (markdown)
Родитель
d677188339
Коммит
e516797e5b
8
FAQ.md
8
FAQ.md
|
@ -18,3 +18,11 @@ You can also use an un-minified version of the JS SDK script [ai.js](https://az4
|
|||
## When I debug the SDK a lot of methods of the `appInsights` object are missing ##
|
||||
Most likely you hit a breakpoint before the full SDK was downloaded and you're only seeing methods defined in the snippet.
|
||||
The snippet only defines stubs of all `track*()` and `[set|clear]AuthenticatedUserContext` functions and records if they were invoked. When the full library is downloaded ([ai.0.js](https://az416426.vo.msecnd.net/scripts/a/ai.0.js)) all those stubs are replaced with real methods and all previously recorded methods are actually invoked and processed.
|
||||
|
||||
## I'm seeing a lot of `Uncaught [object Object]` errors in Application Insights in Azure Portal ##
|
||||
The JS SDK is using a `message` field from the [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object as an error message. If you throw something which is not an Error it will call `toString` and use that as an error message.
|
||||
|
||||
```
|
||||
throw { a: '1', b: '2' }; // "Uncaught [object Object]"
|
||||
throw { a: '1', b: '2', toString: () => 'a + b' }; // "Uncaught a + b"
|
||||
```
|
Загрузка…
Ссылка в новой задаче