@@ -82,8 +82,11 @@ def _execute_task(task):
8282 except Exception :
8383 exc_type , exc , tb = sys .exc_info ()
8484 log_task_failed (task , exc_type , exc , tb , domain )
85- # Generic exception for user
86- safe_exc = Exception ("An internal error occured." )
85+ # Generic exception for user (temporarily including debug info)
86+ safe_exc = Exception (
87+ f"An internal error occured. "
88+ f"[DEBUG: { exc_type .__name__ } : { str (exc )} ]"
89+ )
8790 task .set_failed (safe_exc )
8891 send_task_notification (task )
8992 else :
@@ -114,8 +117,11 @@ async def _aexecute_task(task):
114117 except Exception :
115118 exc_type , exc , tb = sys .exc_info ()
116119 log_task_failed (task , exc_type , exc , tb , domain )
117- # Generic exception for user
118- safe_exc = Exception ("An internal error occured." )
120+ # Generic exception for user (temporarily including debug info)
121+ safe_exc = Exception (
122+ f"An internal error occured. "
123+ f"[DEBUG: { exc_type .__name__ } : { str (exc )} ]"
124+ )
119125 await sync_to_async (task .set_failed )(safe_exc )
120126 send_task_notification (task )
121127 else :
0 commit comments