in message_flow/sagas/participant/plugin_reply_builder.py [0:0]
def with_failure(self, reply: Any = Failure()) -> Tuple[str, IMessage]:
return self._destination, (
MessageBuilder.with_payload(JsonMapper().serialize(reply))
.with_header(
ReplyMessageHeaders.REPLY_OUTCOME, CommandReplyOutcome.FAILURE.value
)
.with_header(ReplyMessageHeaders.REPLY_TYPE, reply.__class__.__name__)
.with_header(IMessage.ID, uuid4().hex)
.with_extra_headers("", self._routing_info)
.build()
)