fixed error handling for failed plugin import.

This commit is contained in:
Stefan Midjich 2016-12-07 14:52:58 +01:00
parent 7950785757
commit 3f4aa5245b
1 changed files with 9 additions and 1 deletions

View File

@ -209,7 +209,15 @@ def job_status(job_id):
@app.route('/approve', method='POST')
def approve_client():
response.content_type = 'application/json'
try:
jobs = dispatch_plugins()
except Exception as e:
response.status = 500
jobs = {
'result': {
'error': str(e)
}
}
return json.dumps(jobs)