Skip to content

Commit

Permalink
Merge pull request #2340 from lbryio/error
Browse files Browse the repository at this point in the history
report errors through internal-apis
  • Loading branch information
skhameneh authored Mar 15, 2019
2 parents 9d97214 + e755f61 commit f8ae0c1
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/ui/component/errorBoundary/view.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// @flow
import { Lbryio } from 'lbryinc';
import * as React from 'react';
import Yrbl from 'component/yrbl';
import Button from 'component/button';

const WEB_HOOK_URL =
'https://hooks.slack.com/services/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';

type Props = {
children: React.Node,
};
Expand All @@ -28,12 +26,7 @@ export default class ErrorBoundary extends React.Component<Props, State> {
declare var app: { env: string };

if (app.env === 'production') {
fetch(WEB_HOOK_URL, {
method: 'POST',
body: JSON.stringify({
text: error.stack,
}),
});
Lbryio.call('event', 'desktop_error', { error_message: error.stack });
}
}

Expand Down

0 comments on commit f8ae0c1

Please sign in to comment.