File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 30
30
api_configuration ,
31
31
user_configuration )
32
32
from core .alert import write_to_api_console
33
+ from core .exit_helper import exit_failure
33
34
from core .get_modules import load_all_modules
34
35
from database .connector import elasticsearch_events
35
36
from flask_swagger import swagger
@@ -686,10 +687,13 @@ def start_api_server():
686
687
}
687
688
app .register_blueprint (documentation_settings )
688
689
689
- app .run (
690
- host = my_api_configuration ["api_host" ],
691
- port = my_api_configuration ["api_port" ],
692
- debug = my_api_configuration ["api_debug_mode" ],
693
- threaded = True
694
- )
690
+ try :
691
+ app .run (
692
+ host = my_api_configuration ["api_host" ],
693
+ port = my_api_configuration ["api_port" ],
694
+ debug = my_api_configuration ["api_debug_mode" ],
695
+ threaded = True
696
+ )
697
+ except Exception as e :
698
+ exit_failure (str (e ))
695
699
return True
You can’t perform that action at this time.
0 commit comments