Skip to content

Commit

Permalink
[update]
Browse files Browse the repository at this point in the history
  • Loading branch information
boke0 committed Mar 4, 2021
1 parent 337424c commit 877df53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions mitama/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def wsgi(self, env, start_response):
try:
response = self(request)
body = response.start(request, start_response)
except Exception:
return self.error(request, 500)
except Exception as err:
print(err)
body = self.error(request, 500).start(request, start_response)
return body

def __call__(self, request):
Expand Down
2 changes: 1 addition & 1 deletion mitama/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def wsgi(self, env, start_response):
print(err)
DatabaseManager.rollback_session()
request = Request(env)
return self.error(request, 500)
body = self.error(request, 500).start(request, start_response)
finally:
DatabaseManager.close_session()
return body
Expand Down

0 comments on commit 877df53

Please sign in to comment.