Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mrc-1259: Better error message when cancelling non-existant task #16

Merged
merged 1 commit into from Dec 16, 2019

Conversation

richfitz
Copy link
Member

This PR prevents an uninformative error while cancelling a non-existant task, replacing it with an informative one. Previously we saw:

obj <- test_rrq()
id <- ids::random_id()
obj$task_cancel(id)
# Error in if (dat$status == TASK_PENDING) { : argument is of length zero

Here, we add a status (TASK_MISSING) if called with a nonexistant task, and the error will come out as

Task abcdef0123456789 is not running (MISSING)"

which is consistent with the case when cancelling a complete task

Task abcdef0123456789 is not running (COMPLETE)"

@codecov
Copy link

codecov bot commented Dec 16, 2019

Codecov Report

Merging #16 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #16   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          17     17           
  Lines        1012   1014    +2     
=====================================
+ Hits         1012   1014    +2
Impacted Files Coverage Δ
R/rrq_controller.R 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ccec3f3...e5a906d. Read the comment docs.

@richfitz richfitz merged commit 82aa413 into master Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant