File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
dev-packages/node-core-integration-tests/suites/system-error
packages/node-core/src/integrations Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ describe('SystemError integration', () => {
21
21
values : [
22
22
{
23
23
type : 'Error' ,
24
- value : 'ENOENT: no such file or directory, open ' ,
25
- }
26
- ]
24
+ value : 'ENOENT: no such file or directory, open' ,
25
+ } ,
26
+ ] ,
27
27
} ,
28
28
} ,
29
29
} )
@@ -40,16 +40,16 @@ describe('SystemError integration', () => {
40
40
errno : - 2 ,
41
41
code : 'ENOENT' ,
42
42
syscall : 'open' ,
43
- path : 'non-existent-file.txt'
43
+ path : 'non-existent-file.txt' ,
44
44
} ,
45
45
} ,
46
46
exception : {
47
47
values : [
48
48
{
49
49
type : 'Error' ,
50
- value : 'ENOENT: no such file or directory, open ' ,
51
- }
52
- ]
50
+ value : 'ENOENT: no such file or directory, open' ,
51
+ } ,
52
+ ] ,
53
53
} ,
54
54
} ,
55
55
} )
Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ export const systemErrorIntegration = defineIntegration(() => {
55
55
for ( const exception of event . exception ?. values || [ ] ) {
56
56
if ( exception . value ) {
57
57
if ( error . path && exception . value . includes ( error . path ) ) {
58
- exception . value = exception . value . replace ( `'${ error . path } '` , '' ) ;
58
+ exception . value = exception . value . replace ( `'${ error . path } '` , '' ) . trim ( ) ;
59
59
}
60
60
if ( error . dest && exception . value . includes ( error . dest ) ) {
61
- exception . value = exception . value . replace ( `'${ error . dest } '` , '' ) ;
61
+ exception . value = exception . value . replace ( `'${ error . dest } '` , '' ) . trim ( ) ;
62
62
}
63
63
}
64
64
}
You can’t perform that action at this time.
0 commit comments