better logs
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m40s
Run linting on the backend code / Build (pull_request) Successful in 55s
Run testing on the backend code / Build (pull_request) Has been cancelled
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 25s

This commit is contained in:
2025-02-20 19:11:23 +01:00
parent 5e27dd9d79
commit 5a2c61d343
7 changed files with 21 additions and 13 deletions

View File

@@ -95,9 +95,10 @@ class Overpass :
return elements
except urllib.error.URLError as e:
self.logger.error(f"Error connecting to Overpass API: {str(exc)}")
raise ConnectionError(f"Error connecting to Overpass API: {str(exc)}") from e
self.logger.error(f"Error connecting to Overpass API: {str(e)}")
raise ConnectionError(f"Error connecting to Overpass API: {str(e)}") from e
except Exception as exc :
self.logger.error(f"unexpected error while fetching data from Overpass: {str(exc)}")
raise Exception(f'An unexpected error occured: {str(exc)}') from exc
@@ -121,7 +122,7 @@ class Overpass :
self.caching_strategy.set(cache_key, elements)
self.logger.debug(f'Cache set for {cache_key}')
except urllib.error.URLError as e:
raise ConnectionError(f"Error connecting to Overpass API: {e}") from e
raise ConnectionError(f"Error connecting to Overpass API: {str(e)}") from e
except Exception as exc :
raise Exception(f'An unexpected error occured: {str(exc)}') from exc