Skip to content

Commit c0cdc4b

Browse files
committed
fix(core): preserve routine request validation order
1 parent 3b539b2 commit c0cdc4b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

crates/chat2db-core/src/community.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,13 @@ impl Application {
10641064
&self,
10651065
request: PreviewCommunityRoutineInvocationRequest,
10661066
) -> Result<CommunityRoutineInvocationPreview, AppError> {
1067+
self.native_driver_for_database_type(&request.database_type)
1068+
.ok_or_else(|| {
1069+
AppError::invalid(
1070+
"invalid_community_routine_invocation_request",
1071+
"routine invocation preview requires a native Rust driver",
1072+
)
1073+
})?;
10671074
let driver = self
10681075
.native_driver_for_community_datasource(&request.datasource_id, &request.database_type)
10691076
.await?

0 commit comments

Comments
 (0)