Issue-ID: INF-376
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Change-Id: I3f8ed081c5896eedda311f00e5a57e7ccf461a56
'''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