Skip to content

Commit b1f9e41

Browse files
authored
Merge pull request #1828 from rajatjindal/fix-error-msg
sqlite sdk throws "database full" error when too many connections are opened
2 parents 7b51c1f + 835e314 commit b1f9e41

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/sqlite/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ impl spin_world::sqlite::Host for SqliteDispatch {
8383
.await
8484
.and_then(|conn| conn.ok_or(spin_world::sqlite::Error::NoSuchDatabase))
8585
.and_then(|conn| {
86-
self.connections
87-
.push(conn)
88-
.map_err(|()| spin_world::sqlite::Error::DatabaseFull)
86+
self.connections.push(conn).map_err(|()| {
87+
spin_world::sqlite::Error::Io("too many connections opened".to_string())
88+
})
8989
}))
9090
}
9191

0 commit comments

Comments
 (0)