diff --git a/giterated-stack/src/substack.rs b/giterated-stack/src/substack.rs index 994527b..f3b1632 100644 --- a/giterated-stack/src/substack.rs +++ b/giterated-stack/src/substack.rs @@ -3,7 +3,7 @@ use std::{collections::HashMap, marker::PhantomData, sync::Arc}; use anyhow::Error; use futures_util::FutureExt; use giterated_models::{ - error::OperationError, + error::{IntoInternalError, OperationError}, instance::Instance, object::{GiteratedObject, ObjectRequest, ObjectResponse}, operation::GiteratedOperation, @@ -293,9 +293,7 @@ impl SubstackBuilder { .await { Ok(setting) => Ok(AnyValue::new(setting)), - Err(err) => { - panic!("Error: {:?}", err); - } + Err(err) => Err(err).as_internal_error(), } } .boxed_local()