Skip to content

Commit

Permalink
Merge pull request #841 from planetscale/nickvanw/vschema-error-message
Browse files Browse the repository at this point in the history
Vschema: make error message more clear
  • Loading branch information
nickvanw authored Mar 25, 2024
2 parents 34cee32 + e68ffd6 commit ca586ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/branch/vschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func GetVSchemaCmd(ch *cmdutil.Helper) *cobra.Command {
if err != nil {
switch cmdutil.ErrCode(err) {
case planetscale.ErrNotFound:
return fmt.Errorf("branch %s does not exist in database %s (organization: %s)",
return fmt.Errorf("received HTTP 404 for branch %s in database %s (organization: %s). This may mean you're requesting a keyspace that does not exist",
printer.BoldBlue(branch), printer.BoldBlue(database), printer.BoldBlue(ch.Config.Organization))
default:
return cmdutil.HandleError(err)
Expand Down Expand Up @@ -140,7 +140,7 @@ func UpdateVSchemaCmd(ch *cmdutil.Helper) *cobra.Command {
if err != nil {
switch cmdutil.ErrCode(err) {
case planetscale.ErrNotFound:
return fmt.Errorf("branch %s does not exist in database %s (organization: %s)",
return fmt.Errorf("received HTTP 404 for branch %s in database %s (org: %s). This may mean you're requesting a keyspace that does not exist or not supplying one if you have multiple",
printer.BoldBlue(branch), printer.BoldBlue(database), printer.BoldBlue(ch.Config.Organization))
default:
return cmdutil.HandleError(err)
Expand Down

0 comments on commit ca586ff

Please sign in to comment.