include current page in error reporting
This commit is contained in:
parent
82c19f3aac
commit
23e8cd4a7e
1 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,11 @@ export default class ErrorBoundary extends React.Component<Props, State> {
|
||||||
componentDidCatch(error: { stack: string }) {
|
componentDidCatch(error: { stack: string }) {
|
||||||
declare var app: { env: string };
|
declare var app: { env: string };
|
||||||
|
|
||||||
|
const errorMessage = `
|
||||||
|
${window.location.pathname + window.location.search}\n
|
||||||
|
${error.stack}
|
||||||
|
`;
|
||||||
|
|
||||||
if (app.env === 'production') {
|
if (app.env === 'production') {
|
||||||
Lbryio.call('event', 'desktop_error', { error_message: error.stack });
|
Lbryio.call('event', 'desktop_error', { error_message: error.stack });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue