Skip to content

Commit 1dffd1d

Browse files
committed
fix: don't throw away the underlying error
1 parent 7df8f4b commit 1dffd1d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

supabase-wrappers/src/utils.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ pub fn report_error(code: PgSqlErrorCode, msg: &str) {
110110

111111
#[derive(Error, Debug)]
112112
pub enum CreateRuntimeError {
113-
#[error("failed to create async runtime")]
114-
FailedToCreateAsyncRuntime,
113+
#[error("failed to create async runtime: {0}")]
114+
FailedToCreateAsyncRuntime(#[from] std::io::Error),
115115
}
116116

117117
impl From<CreateRuntimeError> for ErrorReport {
@@ -148,10 +148,7 @@ impl From<CreateRuntimeError> for ErrorReport {
148148
/// ```
149149
#[inline]
150150
pub fn create_async_runtime() -> Result<Runtime, CreateRuntimeError> {
151-
Builder::new_current_thread()
152-
.enable_all()
153-
.build()
154-
.map_err(|_| CreateRuntimeError::FailedToCreateAsyncRuntime)
151+
Ok(Builder::new_current_thread().enable_all().build()?)
155152
}
156153

157154
/// Get required option value from the `options` map

0 commit comments

Comments
 (0)