change error handler behavior and fix error when a model isn't found (#173)

This commit is contained in:
Patrick Devine
2023-07-21 23:02:12 -07:00
committed by GitHub
parent 37324a0a00
commit 6d6b0d3321
4 changed files with 17 additions and 36 deletions

View File

@@ -140,14 +140,10 @@ func DeleteHandler(cmd *cobra.Command, args []string) error {
client := api.NewClient()
request := api.DeleteRequest{Name: args[0]}
fn := func(resp api.ProgressResponse) error {
fmt.Println(resp.Status)
return nil
}
if err := client.Delete(context.Background(), &request, fn); err != nil {
if err := client.Delete(context.Background(), &request); err != nil {
return err
}
fmt.Printf("deleted '%s'\n", args[0])
return nil
}