Skip to content

error handler in errors.py #1

@ssadler

Description

@ssadler

Couple of small ones:

diff --git a/djng/errors.py b/djng/errors.py
index 9c91c39..9e5e057 100644
--- a/djng/errors.py
+++ b/djng/errors.py
@@ -5,7 +5,7 @@ class ErrorWrapper(object):
     def __init__(self, app, custom_404 = None, custom_500 = None):
         self.app = app
         self.error_404 = custom_404 or self.default_error_404
-        self.error_500 = custom_500 or self.default_error_404
+        self.error_500 = custom_500 or self.default_error_500

     def __call__(self, request):
         try:
@@ -20,4 +20,4 @@ class ErrorWrapper(object):
         return Response('A 404 error occurred', status=404)

     def default_error_500(self, request, e):
-        return Response('A 500 error occurred: %r' % e, status=505)
+        return Response('A 500 error occurred: %r' % e, status=500)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions