Skip to content
Snippets Groups Projects
Commit f4662b24 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: write errors to repsonse in add_new_lake.py

parent 860d5f92
No related branches found
No related tags found
1 merge request!16Clhp map into main
No preview for this file type
No preview for this file type
......@@ -130,10 +130,11 @@ def cut_map(cursor, lake_name: str, cell_size_in_km: float = 0.5) -> (int, str):
except FileNotFoundError as e:
print(f"Failed to find the map file: {e}")
return 404, []
return 404, f"Failed to find the map file: {e}"
except Exception as e:
print(f"Error in adding new map: {e}")
return 500, []
return 500, f"Error in adding new map: {e}"
def create_grid(poly: Polygon, cell_width: float, cell_height: float):
"""
......
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