Skip to content

Commit

Permalink
feat(www): add a form field to distinguish legacy from new submitted …
Browse files Browse the repository at this point in the history
…forms in sentry and salesforce
  • Loading branch information
sbruens committed Oct 6, 2023
1 parent d95c784 commit f3948ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/www/shared/error_reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as Sentry from '@sentry/browser';
import {Integration as SentryIntegration} from '@sentry/types';

export type Tags = {[id: string]: string};
export type Tags = {[id: string]: string | boolean | number};

export interface OutlineErrorReporter {
report(userFeedback: string, feedbackCategory: string, userEmail?: string, tags?: Tags): Promise<void>;
Expand Down
5 changes: 4 additions & 1 deletion src/www/views/contact_view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ export class ContactView extends LitElement {

const {description, email, ...tags} = this.formValues as ValidFormValues;
try {
await this.errorReporter.report(description, this.selectedIssueType?.toString() ?? 'unknown', email, {...tags});
await this.errorReporter.report(description, this.selectedIssueType?.toString() ?? 'unknown', email, {
...tags,
isUpdatedForm: true,
});
} catch (e) {
console.error(`Failed to send feedback report: ${e.message}`);
this.isFormSubmitting = false;
Expand Down

0 comments on commit f3948ea

Please sign in to comment.