Skip to content

fix(http): defer component validation until request build - #2575

Open
BreezeDelegate wants to merge 1 commit into
twilight-rs:mainfrom
BreezeDelegate:fix/http-component-flag-order
Open

fix(http): defer component validation until request build#2575
BreezeDelegate wants to merge 1 commit into
twilight-rs:mainfrom
BreezeDelegate:fix/http-component-flag-order

Conversation

@BreezeDelegate

Copy link
Copy Markdown

Validate message components when the request is built instead of when components() is called. This lets IS_COMPONENTS_V2 be set later in the builder chain while still rejecting invalid components before the request is sent.

Covers create message, followup, forum thread, and webhook builders, with regression tests for the call order.

Fixes #2498

@github-actions github-actions Bot added c-http Affects the http crate t-fix Fixes a bug in the library labels Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-http Affects the http crate t-fix Fixes a bug in the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request builders eagerly checks for component flags

1 participant