OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
Previously, validation errors in the plot create and update views were not being
caught, resulting in a 500 error being logged in Rollbar.
Updating these views to properly handle the validation errors required a fix to
the transform_plot_update_dict function to check for the existence of a key
before trying to read it from the plot dict.
Testing
Use a mobile app and attempt to both create and update a tree with zero diameter and verify that the API response has a 400 status code.
Coverage increased (+0.06%) to 83.852% when pulling 89a0c7b857fd224816bd126c45bf066c0fbbd685 on jwalgran:feature/return-api-validation-errors-as-400 into c655bdd2ec8d3f4dbc9452f421011b8ddde142f2 on OpenTreeMap:develop.
Previously, validation errors in the plot create and update views were not being caught, resulting in a 500 error being logged in Rollbar.
Updating these views to properly handle the validation errors required a fix to the
transform_plot_update_dict
function to check for the existence of a key before trying to read it from the plot dict.Testing
Use a mobile app and attempt to both create and update a tree with zero diameter and verify that the API response has a 400 status code.
Connects to https://github.com/OpenTreeMap/otm-ios/issues/353