def handle_500(self, request, exception):
        # type: (BaseHttpRequest, BaseException) -> Resource
        """
        Handle an *un-handled* exception.
        """
        # Let middleware attempt to handle exception
        try:
            for middleware in self.middleware.handle_500:
                resource = middleware(request, exception)
                if resource:
                    return resource

        except Exception as ex:  # noqa - This is a top level handler
            exception = ex

        # Fallback to generic error
        logger.exception('Internal Server Error: %s', exception, extra={
            'status_code': 500,
            'request': request
        })
        return Error.from_status(HTTPStatus.INTERNAL_SERVER_ERROR, 0,
                                 "An unhandled error has been caught.")