Skip to content

Commit

Permalink
Revert "no sentry, just logging, if backend execution fails" (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 authored Jan 28, 2025
1 parent 210ad58 commit d009caa
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions dispatcher_plugin_nb2workflow/dataserver_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def run_query(self,
task = None,
param_dict = None):

res = None
message = ''
debug_message = ''
query_out = QueryOutput()
Expand All @@ -207,19 +208,16 @@ def run_query(self,
if res.status_code == 200:
resroot = res.json()['data'] if run_asynch else res.json()

if resroot['exceptions']:
except_message = None
if resroot['exceptions']:
if isinstance(resroot['exceptions'][0], dict): # in async
except_message = resroot['exceptions'][0]['ename']+': '+res.json()['data']['exceptions'][0]['evalue']
else:
except_message = res.json()['exceptions'][0]

if resroot['exceptions'][0]['ename'] == 'AnalysisError':
query_out.set_status(1, message='Error in the backend', debug_message=except_message, job_status='failed')
else:
query_out.set_failed('Backend failed',
message='Backend failed. ' + except_message,
job_status='failed')


query_out.set_failed('Backend exception',
message='Backend failed. ' + except_message,
job_status='failed')
return res, query_out

comment_name = self.get_backend_comment(task.strip('/'))
Expand Down

0 comments on commit d009caa

Please sign in to comment.