Skip to content

fix(http): accept successful 2xx responses - #2641

Open
rootsec1 wants to merge 1 commit into
winstonjs:masterfrom
rootsec1:fix/http-2xx-status-codes
Open

rootsec1 wants to merge 1 commit into
winstonjs:masterfrom
rootsec1:fix/http-2xx-status-codes

Conversation

@rootsec1

@rootsec1 rootsec1 commented Aug 31, 2026 •

Copy link
Copy Markdown

The HTTP transport currently treats only 200 OK as a successful delivery. Log endpoints that respond with another valid success status, such as 202 Accepted or 204 No Content, therefore emit a misleading warning instead of logged.

This changes the status check to accept the full 2xx range while preserving the existing behavior for request errors and non-2xx responses. Regression coverage verifies that 204 succeeds and that the 300 boundary still warns.

The focused transport tests pass on Node.js 22, 24, and 26. The full unit and integration suites, TypeScript definitions, and ESLint also pass; ESLint reports the same 10 existing warnings.

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