Send user text as context

This commit is contained in:
James Salter 2021-08-11 17:19:15 +01:00
parent c6202bf653
commit ba1618812c
3 changed files with 24 additions and 22 deletions

View file

@ -29,7 +29,7 @@ import BaseDialog from "./BaseDialog";
import Field from '../elements/Field';
import Spinner from "../elements/Spinner";
import DialogButtons from "../elements/DialogButtons";
import {sendSentryReport} from "../../../sentry";
import { sendSentryReport } from "../../../sentry";
interface IProps {
onFinished: (success: boolean) => void;
@ -116,11 +116,7 @@ export default class BugReportDialog extends React.Component<IProps, IState> {
}
});
// Send a Sentry report if the user agreed to send logs and if there's an error object (Sentry won't be very
// useful for grouping errors without exception information to aggregate with)
if (sendLogs) {
sendSentryReport(userText, this.props.label, this.props.error);
}
sendSentryReport(userText, this.state.issueUrl, this.props.error);
};
private onDownload = async (): Promise<void> => {

View file

@ -51,6 +51,7 @@ export default class TileErrorBoundary extends React.Component<IProps, IState> {
private onBugReport = (): void => {
Modal.createTrackedDialog('Bug Report Dialog', '', BugReportDialog, {
label: 'react-soft-crash-tile',
error: this.state.error,
});
};