tursodatabase / turso-cli

Command line interface to Turso.
https://turso.tech
MIT License
224 stars 37 forks source link

Improve error message for sleeping databases #894

Open penberg opened 3 months ago

penberg commented 3 months ago

If a database (or actually the group) is sleeping, you get the following error message:

$ turso db create foo
Error: could not create database foo: cannot create database on group default because it is sleeping

Let's add information on how to wake it up. For example, with an URL to documentation.

rodrigozrusso commented 3 months ago

The same applies to other commands, e.g:

turso db shell [database] < ./migration.sql
⣾  Connecting to database
Error: failed to execute SQL:
error code 502:

It could display an error message indicating that the database (or group) is sleeping and add a link to wake it up.