Skip to content
Snippets Groups Projects
Commit 0c58da39 authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

Moved missing travel time out of try catch

parent 045cf7fd
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,8 @@ function travel_time_in_minutes(ws_host_port::String, selection::Dict)
# Construct the request URL
url = "$ws_host_port/route/v1/driving/$(start_longitude),$(start_latitude);$(end_longitude),$(end_latitude)?overview=false"
travel_time = missing # Use `missing` to represent null in Julia
try
# Make the request
response = HTTP.get(url)
......@@ -63,7 +65,6 @@ function travel_time_in_minutes(ws_host_port::String, selection::Dict)
travel_time = travel_time_seconds / 60
catch e
println("Error during HTTP request or response parsing: ", e)
travel_time = missing # Use `missing` to represent null in Julia
end
# Populate the columns
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment