fix: cancel retrieval deal - disallow negative deal ID

This commit is contained in:
Dirk McCormick
2021-03-26 09:51:07 +01:00
parent 36c3086376
commit b13f6a3209
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -489,12 +489,12 @@ func (a *API) ClientCancelRetrievalDeal(ctx context.Context, dealid retrievalmar
select {
case err := <-cerr:
if err != nil {
return xerrors.Errorf("canceling retrieval deal erred: %w", err)
return xerrors.Errorf("failed to cancel retrieval deal: %w", err)
}
return nil
case <-ctx.Done():
return xerrors.Errorf("canceling retrieval deal context timeout: %w", ctx.Err())
return xerrors.Errorf("context timeout while canceling retrieval deal: %w", ctx.Err())
}
}