introduce panic rpc to introspection engine.
@@ -28,6 +28,9 @@ pub trait Rpc {
#[rpc(name = "introspect")]
fn introspect(&self, input: IntrospectionInput) -> RpcFutureResult<IntrospectionResultOutput>;
+
+ #[rpc(name = "debugPanic")]
+ fn debug_panic(&self) -> RpcFutureResult<()>;
}
pub struct RpcImpl;
@@ -52,6 +55,10 @@ impl Rpc for RpcImpl {
fn introspect(&self, input: IntrospectionInput) -> RpcFutureResult<IntrospectionResultOutput> {
Box::new(Self::introspect_internal(input.schema, input.force).boxed().compat())
}
+
+ fn debug_panic(&self) -> RpcFutureResult<()> {
+ Box::new(Self::debug_panic().boxed().compat())
+ }
}
impl RpcImpl {
@@ -144,6 +151,10 @@ impl RpcImpl {
let (_, _, connector) = RpcImpl::load_connector(&schema).await?;
RpcImpl::catch(connector.get_metadata()).await
}
+
+ pub async fn debug_panic() -> RpcResult<()> {
+ panic!("This is the debugPanic artificial panic")
+ }
}
#[derive(Debug, Serialize, Deserialize)]
