diff --git a/tests/error_ext.rs b/tests/error_ext.rs index 4ca56a19..36d5e2e6 100644 --- a/tests/error_ext.rs +++ b/tests/error_ext.rs @@ -92,23 +92,23 @@ pub async fn test_failure() { #[Object] impl Query { async fn failure(&self) -> Result { - Err(ResolverError::new(MyError::Error1).into()) + Err(Error::new_with_source(MyError::Error1).into()) } async fn failure2(&self) -> Result { - Err(ResolverError::new(MyError::Error2))?; + Err(Error::new_with_source(MyError::Error2))?; Ok(1) } async fn failure3(&self) -> Result { - Err(ResolverError::new(MyError::Error1) + Err(Error::new_with_source(MyError::Error1) .extend_with(|_, values| values.set("a", 1)) .extend_with(|_, values| values.set("b", 2)))?; Ok(1) } async fn failure4(&self) -> Result { - Err(ResolverError::new(MyError::Error2)) + Err(Error::new_with_source(MyError::Error2)) .extend_err(|_, values| values.set("a", 1)) .extend_err(|_, values| values.set("b", 2))?; Ok(1) @@ -179,7 +179,7 @@ pub async fn test_failure2() { #[Object] impl Query { - async fn failure(&self) -> Result { + async fn failure(&self) -> Result { Err(MyError::Error1)? } }