Closed paulschreiber closed 4 months ago
i can't reproduce this, if i query staging backend for that lat/lon i get data back. see e.g. this CURL snippet:
curl --request POST \
--url https://api.staging.terraso.net/graphql/ \
--header 'Content-Type: application/json' \
--data '{"query":"query soilId($latitude: Float!, $longitude: Float!, $data: SoilIdInputData!) {\n\tsoilId {\n\t\tdataBasedSoilMatches(\n\t\t\tlatitude: $latitude\n\t\t\tlongitude: $longitude\n\t\t\tdata: $data\n\t\t) {\n\t\t\t... on DataBasedSoilMatches { matches {\n\t\t\t\tlocationMatch {\n\t\t\t\t\tscore\n\t\t\t\t\trank\n\t\t\t\t}\n\t\t\t\tdataMatch {\n\t\t\t\t\tscore\n\t\t\t\t\trank\n\t\t\t\t}\n\t\t\t\tcombinedMatch {\n\t\t\t\t\tscore\n\t\t\t\t\trank\n\t\t\t\t}\n\t\t\t\tsoilInfo {\n\t\t\t\t\tsoilSeries {\n\t\t\t\t\t\tname\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}}\n\t}\n}\n","operationName":"soilId","variables":{"latitude":35.62864,"longitude":-82.57032,"data":{"depthDependentData":[]}}}'
Can you reproduce it if you add these coordinates to test_locations
and run make test
?
@paulschreiber no, i can't reproduce that way either!
I can't reproduce this either. However, if list_output_data is "Soil ID not available in this area" (and not a CSV), you won't be able to run the rank_soil function. And practically this shouldn't happen in the app. The rank_soil function is only called when a user enters data and wants to compare it the soil data mapped at their location. If there is no data initially returned then the app shouldn't call the rank_soil function.
@paulschreiber how do you want to handle this issue.
@paulschreiber will test again to see if it reproduces.
This is no longer crashing for me. Closing.
Description
rank soils crashes at -82.57032,35.62864.
It fails in this block of code:
list_output_data
is "Soil ID not available in this area" (and not a CSV).You can detect the condition like so: