Skip to content

Commit

Permalink
Improve error messages in APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Christenson II committed Dec 21, 2023
1 parent ba1bf27 commit d588b4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cli/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,11 @@ func deleteAPICmd(cli *cli) *cobra.Command {

return ansi.ProgressBar("Deleting API(s)", ids, func(_ int, id string) error {
if _, err := cli.api.ResourceServer.Read(cmd.Context(), url.PathEscape(id)); err != nil {
return fmt.Errorf("failed to delete API (%s): %w", id, err)
return fmt.Errorf("failed to delete API with ID %q: %w", id, err)
}

if err := cli.api.ResourceServer.Delete(cmd.Context(), url.PathEscape(id)); err != nil {
return fmt.Errorf("failed to delete API (%s): %w", id, err)
return fmt.Errorf("failed to delete API with ID %q: %w", id, err)
}
return nil
})
Expand Down

0 comments on commit d588b4f

Please sign in to comment.