dpcreator
dpcreator copied to clipboard
"I'm unsure" produces runtime error
In the first step of the wizard, clicking the radio button for "I'm unsure" produces an immediate error.
In the network tab I see a 400 for PATCH https://demo.dpcreator.org/api/depositor-setup-info/144e4877-8076-4afb-956a-d378f7a9b43c/ with this payload:
{"dataset_questions":{"radio_depend_on_private_information":"unsure","radio_best_describes":"","radio_only_one_individual_per_row":""},"default_epsilon":null,"default_delta":null,"epsilon":null,"delta":null}
and this response:
{"dataset_questions":["Dataset question \"radio_depend_on_private_information\" should have a \"yes\" or \"no\" answer, not \"unsure\""]}
- Suggest the "I'm unsure" option be removed if it's not supported.
- And if the API is returning human-readable error messages, we present them in a human-readable way, instead of just giving a developer view of the JSON in the UI:
{
data:{...}
status:400
statusText:"Bad Request"
headers:{...}
config:{...}
}