Skip to content
Snippets Groups Projects
Commit 4b8c251d authored by David Trattnig's avatar David Trattnig
Browse files

refactor: log error in api fetcher

parent cd06127b
No related branches found
No related tags found
1 merge request!35ORM-less scheduling
......@@ -118,6 +118,7 @@ class ApiFetcher(threading.Thread):
self.queue.put(ApiResult(timeslots, 0, "Success", None))
except Exception as e:
# Release the mutex
self.logger.error("Error while fetching new data from API", e)
self.queue.put(
ApiResult([], 1, f"Error while fetching: {str(e)}", traceback.format_exc())
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment