Bladeren bron

add Exception to managed exception in hapic

Bastien Sevajol 8 jaren geleden
bovenliggende
commit
5e1ce6078a
Geen account gekoppeld aan de committers e-mail
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  1. 1 0
      tracim/__init__.py

+ 1 - 0
tracim/__init__.py Bestand weergeven

58
     hapic.set_context(context)
58
     hapic.set_context(context)
59
     context.handle_exception(NotFound, 404)
59
     context.handle_exception(NotFound, 404)
60
     context.handle_exception(OperationalError, 500)
60
     context.handle_exception(OperationalError, 500)
61
+    context.handle_exception(Exception, 500)
61
     # Add controllers
62
     # Add controllers
62
     session_api = SessionController()
63
     session_api = SessionController()
63
     configurator.include(session_api.bind, route_prefix=BASE_API_V2)
64
     configurator.include(session_api.bind, route_prefix=BASE_API_V2)