AllenNeuralDynamics / aind-metadata-service

Service to retrieve Labtracks/Sharepoint info using a REST API
MIT License
3 stars 1 forks source link

Failing to Catch Validation Errors #158

Open mekhlakapoor opened 9 months ago

mekhlakapoor commented 9 months ago

Describe the bug The metadata service is returning the message Valid Model even for models that are expected to have validation errors (for ex when required fields are missing). Issue caught by @saskiad

To Reproduce service returns "valid model" when required fields are missing eg. http://aind-metadata-service/procedures/653980 This says the model is valid but there is no injection_volume field, which is a required field. Expected behavior should catch the validation errors for each of the procedure models and include that in message.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.