Skip to content

Commit 7ddb162

Browse files
committed
Always read datadog post response
This avoids the worker logging potentially confusing messages around a stalled httpe response being cancelled to prevent deadlocks.
1 parent 9f5f83c commit 7ddb162

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/api/datadog.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ export class DatadogApi {
5757
if (!response.ok) {
5858
const text = await response.text();
5959
throw new Error(`Datadog API error (${response.status}): ${text}`);
60+
} else {
61+
// This way we can avoid worker logs about stalled http responses
62+
await response.text();
6063
}
6164
}
6265
}

0 commit comments

Comments
 (0)