oven-sh/bun · error · bun_http::Error
InvalidRedirectURL
Error message
InvalidRedirectURL
What it means
The resolved redirect URL is invalid after processing. Distinct from URLTooLong and URLInvalid at parse time, this catches URLs that parsed but are structurally invalid for use (e.g., missing host after resolution, invalid port).
Solutions
- Verify the redirect target produces a fully-qualified valid URL after resolution
- Check that the redirect Location includes a hostname or resolves against the original request
- Fix server-side redirect configuration to produce complete URLs
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/http/error.rs:72 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/b3052c40860581e0.
Report an issue: GitHub.
Appendix: source
Thrown at src/http/error.rs:72
#[error("UnrequestedUpgrade")]
UnrequestedUpgrade,
#[error("UnexpectedData")]
UnexpectedData,
#[error("InvalidHTTPResponse")]
InvalidHTTPResponse,
#[error("InvalidContentLength")]
InvalidContentLength,
#[error("UnsupportedTransferEncoding")]
UnsupportedTransferEncoding,
#[error("RequestBodyNotReusable")]
RequestBodyNotReusable,
#[error("UnsupportedRedirectProtocol")]
UnsupportedRedirectProtocol,
#[error("RedirectURLTooLong")]
RedirectURLTooLong,
#[error("RedirectURLInvalid")]
RedirectURLInvalid,
#[error("InvalidRedirectURL")]
InvalidRedirectURL,
#[error("UnexpectedRedirect")]
UnexpectedRedirect,
#[error("ShortRead")]
ShortRead,
#[error("WantRead")]
WantRead,
#[error("WantWrite")]
WantWrite,
#[error("HTTP3HandshakeFailed")]
HTTP3HandshakeFailed,
#[error("HTTP3ProtocolError")]
HTTP3ProtocolError,
#[error("HTTP3HeaderEncodingError")]
HTTP3HeaderEncodingError,
#[error("DNSResolutionFailed")]
DNSResolutionFailed,
#[error("HTTP3StreamReset")]View on GitHub (pinned to 8c5296ac45)