Skip to content

Commit 8cc1e81

Browse files
committed
Trim
1 parent 1c8810d commit 8cc1e81

File tree

2 files changed

+9
-9
lines changed
  • dev-packages/node-core-integration-tests/suites/system-error
  • packages/node-core/src/integrations

2 files changed

+9
-9
lines changed

dev-packages/node-core-integration-tests/suites/system-error/test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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
})

packages/node-core/src/integrations/systemError.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)