              # The default response status code is 500 in this case.
                    # You can customize this by passing your own error handler.
                    if listener.auto_acknowledgement:
                        self.listener_error_handler.handle(
                            error=e,
                            request=request,
                            response=response,
                        )
                    else:
                        if response is None:
                      