Commit 5a0ed40
committed
db unarchive: suggest the group unarchive command when applicable
When a user runs turso db unarchive on a database that's part of a
group, the server returns "database X is part of a group, please
unarchive the group instead" but doesn't tell them how. Look up the
database's group on that specific failure path and append the exact
command (`turso group unarchive <group>`) to the error message,
matching the pattern db_replicate already uses.
Falls back to the bare server error when the lookup fails.
Closes #918.
Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>1 parent 2e8610c commit 5a0ed40
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
| |||
0 commit comments