Code Review
/
pti
/
o2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix INF-371 inventoryChange notification of the resourceType, resourcePool, Dms
[pti/o2.git]
/
o2common
/
views
/
route_exception.py
diff --git
a/o2common/views/route_exception.py
b/o2common/views/route_exception.py
index
07a60a3
..
ccb439b
100644
(file)
--- a/
o2common/views/route_exception.py
+++ b/
o2common/views/route_exception.py
@@
-85,3
+85,9
@@
def configure_exception(app):
'''Return a custom message and 500 status code'''
problem = ProblemDetails(500, "Internal Server Error")
return problem.serialize(), 500
'''Return a custom message and 500 status code'''
problem = ProblemDetails(500, "Internal Server Error")
return problem.serialize(), 500
+
+ @app.errorhandler(Exception)
+ def handle_general_exception(error):
+ '''Return a custom message and 500 status code'''
+ problem = ProblemDetails(500, "Internal Server Error")
+ return problem.serialize(), 500