toResult
Converts a WaitSignal to a CommandResult.
This extension function transforms a wait signal into a command result, mapping all the signal properties to the corresponding result fields.
Return
a CommandResult representing the wait signal
Parameters
the original command message
See also
Converts a Throwable to a CommandResult representing a command failure.
This extension function creates a CommandResult from an exception, extracting error information and populating the result with failure details.
Return
a CommandResult representing the failure
Parameters
the ID of the command being waited on
the original command message that failed
the function information (defaults to command gateway)
unique identifier for the result (auto-generated if not provided)
the command stage when the error occurred (defaults to SENT)
additional result data (defaults to empty map)
timestamp of the error (defaults to current time)