fixed error handling for failed plugin import.
This commit is contained in:
parent
7950785757
commit
3f4aa5245b
|
@ -209,7 +209,15 @@ def job_status(job_id):
|
||||||
@app.route('/approve', method='POST')
|
@app.route('/approve', method='POST')
|
||||||
def approve_client():
|
def approve_client():
|
||||||
response.content_type = 'application/json'
|
response.content_type = 'application/json'
|
||||||
|
try:
|
||||||
jobs = dispatch_plugins()
|
jobs = dispatch_plugins()
|
||||||
|
except Exception as e:
|
||||||
|
response.status = 500
|
||||||
|
jobs = {
|
||||||
|
'result': {
|
||||||
|
'error': str(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return json.dumps(jobs)
|
return json.dumps(jobs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue