Skip to content

Commit 7e544f6

Browse files
authored
Remove explicit AbortSignal reason (#5904)
1 parent 9f903dd commit 7e544f6

File tree

4 files changed

+0
-17
lines changed

4 files changed

+0
-17
lines changed

packages/datadog-instrumentations/test/child_process.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,6 @@ describe('child process', () => {
345345
const abortError = new Error('AbortError')
346346
function abort ({ abortController }) {
347347
abortController.abort(abortError)
348-
349-
if (!abortController.signal.reason) {
350-
abortController.signal.reason = abortError
351-
}
352348
}
353349

354350
beforeEach(() => {

packages/datadog-instrumentations/test/mysql2.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ describe('mysql2 instrumentation', () => {
1212
assert.isString(sql)
1313
const error = new Error('Test')
1414
abortController.abort(error)
15-
16-
if (!abortController.signal.reason) {
17-
abortController.signal.reason = error
18-
}
1915
}
2016

2117
function noop () {}

packages/datadog-instrumentations/test/pg.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ describe('pg instrumentation', () => {
2323
function abortQuery ({ abortController }) {
2424
const error = new Error('Test')
2525
abortController.abort(error)
26-
27-
if (!abortController.signal.reason) {
28-
abortController.signal.reason = error
29-
}
3026
}
3127

3228
before(() => {

packages/dd-trace/src/appsec/rasp/utils.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ function handleResult (result, req, res, abortController, config, raspRule) {
5858
const abortError = new DatadogRaspAbortError(req, res, blockingAction, raspRule, ruleTriggered)
5959
abortController.abort(abortError)
6060

61-
// TODO Delete this when support for node 16 is removed
62-
if (!abortController.signal.reason) {
63-
abortController.signal.reason = abortError
64-
}
65-
6661
return
6762
}
6863
}

0 commit comments

Comments
 (0)