mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
fixed error handling for failed plugin import.
This commit is contained in:
parent
7950785757
commit
3f4aa5245b
1 changed files with 9 additions and 1 deletions
10
portal.py
10
portal.py
|
@ -209,7 +209,15 @@ def job_status(job_id):
|
|||
@app.route('/approve', method='POST')
|
||||
def approve_client():
|
||||
response.content_type = 'application/json'
|
||||
jobs = dispatch_plugins()
|
||||
try:
|
||||
jobs = dispatch_plugins()
|
||||
except Exception as e:
|
||||
response.status = 500
|
||||
jobs = {
|
||||
'result': {
|
||||
'error': str(e)
|
||||
}
|
||||
}
|
||||
|
||||
return json.dumps(jobs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue