We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3878176 commit 02fd305Copy full SHA for 02fd305
src/lib/db.ts
@@ -198,9 +198,11 @@ ${' '.repeat(5 + lineNumber.toString().length + 2 + lineOffset)}^
198
}
199
return { data: null, error: { code: error.code, message: error.message } }
200
} finally {
201
- // If the error isn't a "DatabaseError" assume it's a connection related we kill the connection
202
- // To attempt a clean reconnect on next try
203
- await this.end()
+ if (this && this.end) {
+ // If the error isn't a "DatabaseError" assume it's a connection related we kill the connection
+ // To attempt a clean reconnect on next try
204
+ await this.end()
205
+ }
206
207
208
},
0 commit comments