From 0bd516357447a4a329094941895c7af5bf53e2e9 Mon Sep 17 00:00:00 2001 From: Benjamin Redelings Date: Tue, 3 Oct 2023 13:15:31 -0400 Subject: [PATCH] Fix previous fix. --- ws/tolwsbooting.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ws/tolwsbooting.cpp b/ws/tolwsbooting.cpp index 92bbd6e9..2b5c1269 100644 --- a/ws/tolwsbooting.cpp +++ b/ws/tolwsbooting.cpp @@ -345,7 +345,9 @@ string taxon_addition_method_handler( const json& parsedargs ) // But this just handles one addition. auto [locked_taxonomy,lock] = tts.get_writable_taxonomy(); - auto taxa = extract_required_argument(parsedargs, "taxa"); + if (not parsedargs.count("taxa")) + throw OTCBadRequest()<< "expected a field called 'taxa'"; + auto taxa = parsedargs["taxa"]; int num_new_ottids = extract_required_argument(parsedargs, "new_ottids_required"); if (taxa.size() > num_new_ottids) throw OTCBadRequest() << "Amendment mentions "<