report errors through internal-apis

This commit is contained in:
Sean Yesmunt 2019-03-15 12:37:56 -04:00
parent 47283658b5
commit e755f61e14

View file

@ -1,11 +1,9 @@
// @flow // @flow
import { Lbryio } from 'lbryinc';
import * as React from 'react'; import * as React from 'react';
import Yrbl from 'component/yrbl'; import Yrbl from 'component/yrbl';
import Button from 'component/button'; import Button from 'component/button';
const WEB_HOOK_URL =
'https://hooks.slack.com/services/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';
type Props = { type Props = {
children: React.Node, children: React.Node,
}; };
@ -28,12 +26,7 @@ export default class ErrorBoundary extends React.Component<Props, State> {
declare var app: { env: string }; declare var app: { env: string };
if (app.env === 'production') { if (app.env === 'production') {
fetch(WEB_HOOK_URL, { Lbryio.call('event', 'desktop_error', { error_message: error.stack });
method: 'POST',
body: JSON.stringify({
text: error.stack,
}),
});
} }
} }