-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
tech/enginesIssue for tech Engines.Issue for tech Engines.topic: Timed out during query executiontopic: errortopic: sqlitetopic: tech debtInitiatives to improve the experience of working with the code baseInitiatives to improve the experience of working with the code base
Description
We had a test that attempted concurrent writes to SQLite. Since quaint maps SQLite’s DatabaseBusy error to SocketTimeout, and there’s no case for the (ErrorKind::SocketTimeout, ConnectionInfo::Sqlite { .. }) pair in user_facing_errors::quaint::render_quaint_error, the error looked like this:
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: ConnectionError(Timed out during query execution.) })
161 | throw new PrismaClientRustPanicError(message, this.client._clientVersion)
162 | } else if (e instanceof PrismaClientUnknownRequestError) {
> 163 | throw new PrismaClientUnknownRequestError(message, this.client._clientVersion)
| ^
It would be nice to have some user-facing error with the correct message here (e.g., “The database file is locked”).
The updated source code link is: https://github.com/prisma/prisma-engines/blob/b567896ae76a9c991a5aca05b09b97c7628357cd/quaint/src/connector/sqlite/error.rs#L87-L96.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
tech/enginesIssue for tech Engines.Issue for tech Engines.topic: Timed out during query executiontopic: errortopic: sqlitetopic: tech debtInitiatives to improve the experience of working with the code baseInitiatives to improve the experience of working with the code base