natverse / rcatmaid

R package providing API access to the CATMAID web image annotation tool
https://natverse.github.io/rcatmaid
GNU General Public License v3.0
9 stars 6 forks source link

More descriptive error for non-existing skid when adding annotations #160

Open mmc46 opened 4 years ago

mmc46 commented 4 years ago

When using catmaid_set_annotations_for_skeletons can the error be improved when skids don't exist?

Currently

catmaid_set_annotations_for_skeletons(11111111, annotations = "MC_test")
Error in catmaid_fetch(path, body = post_data, include_headers = F, simplifyVector = T,  : 
  Internal Server Error (HTTP 500).

For removing annotations, the error is better

catmaid_remove_annotations_for_skeletons(11111111, annotations = "MC_test")
Error in catmaid_remove_annotations_for_skeletons(11111111, annotations = "MC_test") : 
  No entity ids founds from skids!