@classmethod
def create_by_request(cls, request, exception):
    """
        Create error to request

        :param request: request
        :type request: messages.IncomingRequest
        :param exception: exception to send
        :type exception: Exception
        :return: response object
        :rtype: messages.Response
        """
    headers = {'correlation_id': request.correlation_id, 'request_id':
        request.request_id, 'source': str(request.destination),
        'destination': str(request.reply_to or request.source), 'reply_to': ''}
    request_headers = request.headers.copy()
    request_headers.update(headers)
    return cls(request_headers, request.context, exception)
