fix error handling

This commit is contained in:
aarshkshah1992 2021-03-31 10:52:17 +05:30 committed by Łukasz Magiera
parent 8733cea902
commit 182da9d4ef

View File

@ -1204,10 +1204,10 @@ var clientRetrieveCmd = &cli.Command{
if !ok {
if evt.Status == retrievalmarket.DealStatusCompleted {
afmt.Println("Success")
return nil
} else {
afmt.Printf("saw final deal state %s instead of expected success state DealStatusCompleted", retrievalmarket.DealStatuses[evt.Status])
}
return xerrors.Errorf("saw final deal state %s instead of expected state DealStatusCompleted", retrievalmarket.DealStatuses[evt.Status])
return nil
}
case <-ctx.Done():