When a user fetches iNaturalist observations and one is missing the observed_on timestamp value the application returns a generic Server Encountered Error message. Improve this error message to let the user know that they must fix the Observed value for one of their observations.
Here is the error from the server logs when this issue occurs:
File "/api/main.py", line 115, in get_inaturalist
observations = get_inaturalist_observations(user_id=user_id,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/api/inaturalist.py", line 64, in get_inaturalist_observations
observed_on.hour * 3600 + observed_on.minute * 60 + observed_on.second
^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'hour'
When a user fetches iNaturalist observations and one is missing the
observed_on
timestamp value the application returns a genericServer Encountered Error
message. Improve this error message to let the user know that they must fix theObserved
value for one of their observations.Here is the error from the server logs when this issue occurs: