Skip to content

db unarchive: suggest the group unarchive command when applicable#1041

Open
c-tonneslan wants to merge 1 commit into
tursodatabase:mainfrom
c-tonneslan:fix/wakeup-suggest-group-unarchive
Open

db unarchive: suggest the group unarchive command when applicable#1041
c-tonneslan wants to merge 1 commit into
tursodatabase:mainfrom
c-tonneslan:fix/wakeup-suggest-group-unarchive

Conversation

@c-tonneslan
Copy link
Copy Markdown

Closes #918.

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 `) to the error message, matching the pattern `db_replicate` already uses.

Falls back to the bare server error when the lookup fails.

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 tursodatabase#918.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show the command to unarchive group when a user tries to unarchive a db

1 participant