Skip to content

Comments

chore: avoid panic in HTTP transport: return error instead of expect#2862

Merged
mattsse merged 1 commit intoalloy-rs:mainfrom
prestoalvarez:main
Sep 11, 2025
Merged

chore: avoid panic in HTTP transport: return error instead of expect#2862
mattsse merged 1 commit intoalloy-rs:mainfrom
prestoalvarez:main

Conversation

@prestoalvarez
Copy link
Contributor

  • Replace expect("request parts are invalid") with map_err(TransportErrorKind::custom)? when building the Hyper request.
  • Prevents crashes on malformed headers/URI; returns a structured TransportError instead.

@mattsse mattsse changed the title Avoid panic in HTTP transport: return error instead of expect chore: avoid panic in HTTP transport: return error instead of expect Sep 11, 2025
@github-project-automation github-project-automation bot moved this to Reviewed in Alloy Sep 11, 2025
@mattsse mattsse merged commit 4980a57 into alloy-rs:main Sep 11, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Sep 11, 2025
nadtech-hub added a commit to nadtech-hub/alloy that referenced this pull request Nov 12, 2025
nadtech-hub added a commit to nadtech-hub/alloy that referenced this pull request Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants