Add an error for when a node's type does not exist
There is a field typename
in the nodes
table in the database, which (despite its name) is an integer that indicates whether the node is a note, a corpus, etc. The correspondence between this integer and a value of Haskell type NodeType
is made in the nodeTypes
declaration in module Gargantext.Database.Admin.Config
.
It is conceivable for a node to be stored as a row in the nodes
table without its typename
field corresponding to any NodeType
value. A constructor of NodeError
should be added to handle this case (and all of the related machinery should be updated accordingly).