|
@@ -59,11 +59,13 @@ def web(global_config, **local_settings):
|
59
|
59
|
# set Hapic
|
60
|
60
|
context = PyramidContext(
|
61
|
61
|
configurator=configurator,
|
62
|
|
- default_error_builder=ErrorSchema()
|
|
62
|
+ default_error_builder=ErrorSchema(),
|
|
63
|
+ debug=app_config.DEBUG,
|
63
|
64
|
)
|
64
|
65
|
hapic.set_context(context)
|
65
|
66
|
context.handle_exception(NotFound, 404)
|
66
|
67
|
context.handle_exception(OperationalError, 500)
|
|
68
|
+ context.handle_exception(Exception, 500)
|
67
|
69
|
# Add controllers
|
68
|
70
|
session_controller = SessionController()
|
69
|
71
|
system_controller = SystemController()
|