Skip to content

Commit 004423e

Browse files
committed
chore(internal): add debug logs for stream responses (#182)
1 parent c819ea4 commit 004423e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ type APIResponseProps = {
4242
async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
4343
const { response } = props;
4444
if (props.options.stream) {
45+
debug('response', response.status, response.url, response.headers, response.body);
46+
4547
// Note: there is an invariant here that isn't represented in the type system
4648
// that if you set `stream: true` the response type must also be `Stream<T>`
4749
return Stream.fromSSEResponse(response, props.controller) as any;

0 commit comments

Comments
 (0)