mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Include stack trace when automation is not successfully craeted
This commit is contained in:
@@ -459,7 +459,7 @@ async def post_automation(
|
|||||||
# Use the query to run as the scheduling request if the scheduling request is unset
|
# Use the query to run as the scheduling request if the scheduling request is unset
|
||||||
automation = await schedule_automation(query_to_run, subject, crontime, timezone, q, user, request.url)
|
automation = await schedule_automation(query_to_run, subject, crontime, timezone, q, user, request.url)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error creating automation {q} for {user.email}: {e}")
|
logger.error(f"Error creating automation {q} for {user.email}: {e}", exc_info=True)
|
||||||
return Response(
|
return Response(
|
||||||
content=f"Unable to create automation. Ensure the automation doesn't already exist.",
|
content=f"Unable to create automation. Ensure the automation doesn't already exist.",
|
||||||
media_type="text/plain",
|
media_type="text/plain",
|
||||||
|
|||||||
@@ -756,7 +756,7 @@ async def chat(
|
|||||||
q, timezone, user, request.url, meta_log
|
q, timezone, user, request.url, meta_log
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error creating automation {q} for {user.email}: {e}")
|
logger.error(f"Error creating automation {q} for {user.email}: {e}", exc_info=True)
|
||||||
return Response(
|
return Response(
|
||||||
content=f"Unable to create automation. Ensure the automation doesn't already exist.",
|
content=f"Unable to create automation. Ensure the automation doesn't already exist.",
|
||||||
media_type="text/plain",
|
media_type="text/plain",
|
||||||
|
|||||||
Reference in New Issue
Block a user