Some kind of function that does a sanity check on an incoming tree object to make sure that it really is in the format of a Nextstrain tree. Right now if the user comes in with a fetch URL pointed at the wrong data (or just uploads a totally wrong JSON, for that matter), there's no warning. Everything continues seems to be fine until they try to select their State/Province and the list of options is empty (because parsing those options produces nothing since it's not really a tree).
We probably want to pair this with creating some kind of error message that pops up when the user gives us a bad tree for ingestion, along with blocking however the app would normally progress (eg, showing the Upload Modal to add in more details).
Some kind of function that does a sanity check on an incoming tree object to make sure that it really is in the format of a Nextstrain tree. Right now if the user comes in with a fetch URL pointed at the wrong data (or just uploads a totally wrong JSON, for that matter), there's no warning. Everything continues seems to be fine until they try to select their State/Province and the list of options is empty (because parsing those options produces nothing since it's not really a tree).
We probably want to pair this with creating some kind of error message that pops up when the user gives us a bad tree for ingestion, along with blocking however the app would normally progress (eg, showing the Upload Modal to add in more details).