pub enum RequestBuildErrorKind {
Show 19 variants
AuthPasswordRender(RenderError),
AuthTokenRender(RenderError),
AuthUsernameRender(RenderError),
BodyFileStream(Error),
BodyFormFieldRender {
field: String,
error: RenderError,
},
BodyMissing {
previous_request_id: RequestId,
},
BodyRender(RenderError),
BodyStream(RenderError),
Build(Error),
CurlInvalidUtf8(Utf8Error),
HeaderInvalidName {
header: String,
error: InvalidHeaderName,
},
HeaderInvalidValue {
header: String,
error: InvalidHeaderValue,
},
HeaderRender {
header: String,
error: RenderError,
},
Json(JsonTemplateError),
OverrideFormBody,
QueryRender {
parameter: String,
error: RenderError,
},
RecipeUnknown(UnknownRecipeError),
UrlInvalid {
url: String,
error: ParseError,
},
UrlRender(RenderError),
}Expand description
The various errors that can occur while building a request. This provides the error for RequestBuildError, which then attaches additional context.
Variants§
AuthPasswordRender(RenderError)
Error rendering username in Basic auth
AuthTokenRender(RenderError)
Error rendering token in Bearer auth
AuthUsernameRender(RenderError)
Error rendering username in Basic auth
BodyFileStream(Error)
Error streaming directly from a file to a request body (via reqwest)
BodyFormFieldRender
Error rendering a body to bytes/stream
BodyMissing
Attempted to build a new request from a previous request, but the old request doesn’t have a body saved
This happens if:
- Body was larger than
HttpEngineConfig::large_body_size - Body was streamed
BodyRender(RenderError)
Error rendering a body to bytes/stream
BodyStream(RenderError)
Error while streaming bytes for a body
Build(Error)
Error assembling the final request
CurlInvalidUtf8(Utf8Error)
Attempted to generate a cURL command for a request with non-UTF-8 values, which we don’t support representing in the generated command
HeaderInvalidName
Header name does not meet the HTTP spec
HeaderInvalidValue
Header name does not meet the HTTP spec
HeaderRender
Header value does not meet the HTTP spec
Json(JsonTemplateError)
Error parsing JSON override template
OverrideFormBody
Passed a full-body override template for a form body. This is disallowed; instead, overrides are applied by individual field
QueryRender
Error rendering query parameter
RecipeUnknown(UnknownRecipeError)
Tried to build a recipe that doesn’t exist
UrlInvalid
URL rendered correctly but the result isn’t a valid URL
UrlRender(RenderError)
Error rendering URL
Trait Implementations§
Source§impl Debug for RequestBuildErrorKind
impl Debug for RequestBuildErrorKind
Source§impl Display for RequestBuildErrorKind
impl Display for RequestBuildErrorKind
Source§impl Error for RequestBuildErrorKind
impl Error for RequestBuildErrorKind
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for RequestBuildErrorKind
impl From<Error> for RequestBuildErrorKind
Source§impl From<JsonTemplateError> for RequestBuildErrorKind
impl From<JsonTemplateError> for RequestBuildErrorKind
Source§fn from(source: JsonTemplateError) -> Self
fn from(source: JsonTemplateError) -> Self
Source§impl From<UnknownRecipeError> for RequestBuildErrorKind
impl From<UnknownRecipeError> for RequestBuildErrorKind
Source§fn from(source: UnknownRecipeError) -> Self
fn from(source: UnknownRecipeError) -> Self
Auto Trait Implementations§
impl Freeze for RequestBuildErrorKind
impl !RefUnwindSafe for RequestBuildErrorKind
impl Send for RequestBuildErrorKind
impl Sync for RequestBuildErrorKind
impl Unpin for RequestBuildErrorKind
impl UnsafeUnpin for RequestBuildErrorKind
impl !UnwindSafe for RequestBuildErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.