Skip to content

Commit f7abbec

Browse files
fix: strip gmail url from report
1 parent 547e7d5 commit f7abbec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

extension/js/common/platform/catch.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,14 @@ export class Catch {
262262
}
263263
}
264264
const exception = Catch.formExceptionFromThrown(thrown);
265+
const reportUrl = location.href.split('?')[0];
265266
return {
266267
name: exception.name.substring(0, 50),
267268
message: Catch.groupSimilarReports(exception.message.substring(0, 200)),
268-
// Use https://mail.google.com/mail as URL for content script errors
269+
// Strip Gmail URLs to group similar errors from different threads/messages
269270
// https://github.com/FlowCrypt/flowcrypt-browser/issues/6031
270-
url: Catch.RUNTIME_ENVIRONMENT === 'ex:s:gmail' ? 'https://mail.google.com/mail' : Catch.groupSimilarReports(location.href.split('?')[0]),
271+
// https://github.com/FlowCrypt/flowcrypt-browser/issues/6128
272+
url: Catch.RUNTIME_ENVIRONMENT.endsWith(':ex:s:gmail') ? 'https://mail.google.com/mail/' : Catch.groupSimilarReports(reportUrl),
271273
line: line || 1,
272274
col: col || 1,
273275
trace: Catch.groupSimilarReports(exception.stack || ''),

0 commit comments

Comments
 (0)