include current page in error reporting

This commit is contained in:
Sean Yesmunt 2019-04-14 13:22:36 -04:00
parent 82c19f3aac
commit 23e8cd4a7e

View file

@ -25,6 +25,11 @@ export default class ErrorBoundary extends React.Component<Props, State> {
componentDidCatch(error: { stack: string }) {
declare var app: { env: string };
const errorMessage = `
${window.location.pathname + window.location.search}\n
${error.stack}
`;
if (app.env === 'production') {
Lbryio.call('event', 'desktop_error', { error_message: error.stack });
}