DomainEventException
Exception wrapper for domain events containing error information.
This exception is thrown when a domain event contains error details that need to be propagated as an exception. It wraps the original domain event and extracts the error code and message from the event body.
Parameters
domainEvent
The domain event that contains error details
See also
Throws
if the domain event body is not ErrorInfo
Constructors
Properties
Functions
Link copied to clipboard
Converts this Throwable to standardized ErrorInfo.
Link copied to clipboard
fun Throwable.toResult(waitCommandId: String, commandMessage: CommandMessage<*>, function: FunctionInfoData = COMMAND_GATEWAY_FUNCTION, id: String = generateGlobalId(), stage: CommandStage = CommandStage.SENT, result: Map<String, Any> = emptyMap(), signalTime: Long = System.currentTimeMillis()): CommandResult
Converts a Throwable to a CommandResult representing a command failure.