From 689db0b8058527ae5c3af5e457c962d8a6635297 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:16:47 +0100 Subject: [PATCH] chore(internal): add debug logs for stream responses (#380) --- src/core.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core.ts b/src/core.ts index 4120de182..9cd99639d 100644 --- a/src/core.ts +++ b/src/core.ts @@ -42,6 +42,8 @@ type APIResponseProps = { async function defaultParseResponse(props: APIResponseProps): Promise { const { response } = props; if (props.options.stream) { + debug('response', response.status, response.url, response.headers, response.body); + // Note: there is an invariant here that isn't represented in the type system // that if you set `stream: true` the response type must also be `Stream` return Stream.fromSSEResponse(response, props.controller) as any;