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', () => {
2121 values : [
2222 {
2323 type : 'Error' ,
24- value : 'ENOENT: no such file or directory, open ' ,
25- }
26- ]
24+ value : 'ENOENT: no such file or directory, open' ,
25+ } ,
26+ ] ,
2727 } ,
2828 } ,
2929 } )
@@ -40,16 +40,16 @@ describe('SystemError integration', () => {
4040 errno : - 2 ,
4141 code : 'ENOENT' ,
4242 syscall : 'open' ,
43- path : 'non-existent-file.txt'
43+ path : 'non-existent-file.txt' ,
4444 } ,
4545 } ,
4646 exception : {
4747 values : [
4848 {
4949 type : 'Error' ,
50- value : 'ENOENT: no such file or directory, open ' ,
51- }
52- ]
50+ value : 'ENOENT: no such file or directory, open' ,
51+ } ,
52+ ] ,
5353 } ,
5454 } ,
5555 } )
Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ export const systemErrorIntegration = defineIntegration(() => {
5555 for ( const exception of event . exception ?. values || [ ] ) {
5656 if ( exception . value ) {
5757 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 ( ) ;
5959 }
6060 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 ( ) ;
6262 }
6363 }
6464 }
You can’t perform that action at this time.
0 commit comments