Skip to content

Commit

Permalink
Refactor RouteProvider to handle exceptions and set response status t…
Browse files Browse the repository at this point in the history
…o 500
  • Loading branch information
josephmancuso committed Oct 23, 2024
1 parent 65be2bd commit c97e646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/masonite/providers/RouteProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def boot(self):
else:
response.view(data)
except Exception as e:
response.status(500)
if not response.get_status_code():
response.status(500)
exception = e

self.application.make("middleware").run_route_middleware(
Expand Down

0 comments on commit c97e646

Please sign in to comment.