NotFoundResourceException
class NotFoundResourceException(errorMsg: String = ErrorCodes.NOT_FOUND_MESSAGE, cause: Throwable? = null) : WowException
Exception thrown when a requested resource cannot be found.
This exception is used to indicate that a resource (such as an aggregate, command result, or query result) was not found. It extends WowException and uses the standard NOT_FOUND error code for consistent error handling.
Example usage:
if (aggregate == null) {
throw NotFoundResourceException("Aggregate with ID $id not found")
}Content copied to clipboard
Parameters
errorMsg
the error message (defaults to standard not found message)
cause
the underlying cause of this exception, if any
See also
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.