Skip to content

feat(node-http-handler): pass client logger to request handlers#2170

Draft
aBurmeseDev wants to merge 3 commits into
smithy-lang:mainfrom
aBurmeseDev:feat/pass-client-logger-to-request-handler
Draft

feat(node-http-handler): pass client logger to request handlers#2170
aBurmeseDev wants to merge 3 commits into
smithy-lang:mainfrom
aBurmeseDev:feat/pass-client-logger-to-request-handler

Conversation

@aBurmeseDev

Copy link
Copy Markdown
Contributor

Issue #, if available:
aws/aws-sdk-js-v3#6130
JS-7027

Description of changes:

  • Injects the client logger into the request handler via getHttpHandlerExtensionConfig, routing handler-emitted warnings through customer's logger instead of console.warn
  • Handler loggers take precedence that updateHttpClientConfig uses nullish assignment for the logger key so an explicitly-set handler logger is never overwritten
  • Skips injection when the logger is NoOpLogger to preserve the existing console fallback for those who doesn't have a logger configured

Testing

  • unit tests for logger injection in getHttpHandlerExtensionConfig
  • unit tests for NodeHttpHandler.updateHttpClientConfig nullish
  • unit tests for UndiciHttpHandler.updateHttpClientConfig

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aBurmeseDev
aBurmeseDev requested a review from a team as a code owner July 21, 2026 08:23
aBurmeseDev and others added 2 commits July 21, 2026 01:29
TypeScript strict mode cannot narrow `value` from the full
`NodeHttpHandlerOptions[typeof key]` union when branching on
`key === "logger"`. Add an explicit cast to fix the build:types
target in CI.
@aBurmeseDev
aBurmeseDev marked this pull request as draft July 23, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant