Update error handling; update selector; change delete response code to 200
[pti/o2.git] / o2app / entrypoints / flask_application.py
index c1f5c8a..0f9d3f4 100644 (file)
@@ -18,6 +18,7 @@ from flask_restx import Api
 
 from o2app import bootstrap
 from o2ims.views import configure_namespace as ims_route_configure_namespace
+from o2common.views.route_exception import configure_exception
 
 from o2ims.adapter.clients.alarm_dict_client import load_alarm_definition
 from o2common.authmw import authmiddleware
@@ -51,12 +52,14 @@ if auth:
 app.config.SWAGGER_UI_DOC_EXPANSION = 'list'
 # app.config['RESTX_MASK_HEADER'] = 'fields'
 app.config['RESTX_MASK_SWAGGER'] = False
+app.config['ERROR_INCLUDE_MESSAGE'] = False
 api = Api(app, version=FLASK_API_VERSION,
           title='INF O2 Services API',
           description='Swagger OpenAPI document for the INF O2 Services',
           )
 bus = bootstrap.bootstrap()
 
+configure_exception(api)
 ims_route_configure_namespace(api)
 
 load_alarm_definition(bus.uow)