File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ const path = require('path')
3
3
const i18n = require ( 'i18next' )
4
4
const dialog = require ( './dialog' )
5
5
6
- const issueTemplate = ( e ) => `Please describe what you were doing when this error happened.
6
+ const issueTitle = ( e ) => {
7
+ const es = e . stack ? e . stack . toString ( ) : 'unknown error, no stacktrace'
8
+ const firstLine = es . substr ( 0 , Math . min ( es . indexOf ( '\n' ) , 72 ) )
9
+ return `[gui error report] ${ firstLine } `
10
+ }
11
+
12
+ const issueTemplate = ( e ) => `👉️ Please describe what you were doing when this error happened.
7
13
8
14
**Specifications**
9
15
@@ -21,7 +27,7 @@ ${e.stack}
21
27
22
28
let hasErrored = false
23
29
24
- const generateErrorIssueUrl = ( e ) => `https://github.com/ipfs-shipyard/ipfs-desktop/issues/new?labels=need%2Ftriage&template=bug_report.md&title=[gui%20error%20report] &body=${ encodeURI ( issueTemplate ( e ) ) } ` . substring ( 0 , 1999 )
30
+ const generateErrorIssueUrl = ( e ) => `https://github.com/ipfs-shipyard/ipfs-desktop/issues/new?labels=kind%2Fbug%2C+ need%2Ftriage&template=bug_report.md&title=${ encodeURI ( issueTitle ( e ) ) } &body=${ encodeURI ( issueTemplate ( e ) ) } ` . substring ( 0 , 1999 )
25
31
26
32
function criticalErrorDialog ( e ) {
27
33
if ( hasErrored ) return
You can’t perform that action at this time.
0 commit comments