Struct async_graphql::InputValueError
source · pub struct InputValueError<T> { /* private fields */ }
Expand description
An error parsing an input value.
This type is generic over T as it uses T’s type name when converting to a regular error.
Implementations§
source§impl<T: InputType> InputValueError<T>
impl<T: InputType> InputValueError<T>
sourcepub fn expected_type(actual: Value) -> Self
pub fn expected_type(actual: Value) -> Self
The expected input type did not match the actual input type.
sourcepub fn custom(msg: impl Display) -> Self
pub fn custom(msg: impl Display) -> Self
A custom error message.
Any type that implements Display
is automatically converted to this if
you use the ?
operator.
sourcepub fn propagate<U: InputType>(self) -> InputValueError<U>
pub fn propagate<U: InputType>(self) -> InputValueError<U>
Propagate the error message to a different type.
sourcepub fn into_server_error(self, pos: Pos) -> ServerError
pub fn into_server_error(self, pos: Pos) -> ServerError
Convert the error into a server error.