Improve the interface to the subcorpus creation feature
Relates to #384
Creating a subcorpus previously returned a Bool
to the frontend. Now we give back the ID of the newly created node, and handle errors using a proper error.
Note that I used an InternalValidationError
(in Gargantext.API.Node.Corpus.Subcorpus
), but I am not sure how the Validation
type that goes inside it is supposed to work. I picked the most direct way to turn a String
into a Validation
, assuming it was the right one, but if someone could have a look and tell me if this is the correct, that would be nice.