From 201b2fa60967c393d26b8d0cfcc703acfee6c76b Mon Sep 17 00:00:00 2001 From: Gott Date: Fri, 24 Mar 2023 15:49:29 +0000 Subject: [PATCH] feat(debug): log request id when debug mode is on (#705) --- src/Client.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Client.ts b/src/Client.ts index 78acc948..826c1cc5 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -124,6 +124,10 @@ export class Client { compress, }) + if (this.debug?.verbose && response.headers.get('x-request-id')) { + console.info('Request ID: ', response.headers.get('x-request-id')) + } + const contentType = response.headers.get('content-type') if (contentType && contentType.includes('json')) {