tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL
https://docs.turso.tech/sdk/ts/quickstart
MIT License
289 stars 37 forks source link

Improve error message when transaction times out #59

Closed penberg closed 1 year ago

penberg commented 1 year ago

If a transaction times out because of the 5 second time limit in sqld:

WARN sqld::database::libsql: transaction timed out
ERROR tower_http::trace::on_failure: response failed classification=Error: Could not execute a request in pipeline latency=0 ms

A client will just see a "server error":

[LibsqlError: SERVER_ERROR: Server returned HTTP status 502] {
  code: 'SERVER_ERROR',
  name: 'LibsqlError'
} 
honzasp commented 1 year ago

This is a problem in sqld, not in the client.