Class TenantNotResolvedException

All Implemented Interfaces:
Serializable

public class TenantNotResolvedException extends AxonNonTransientException
Exception thrown when no tenant can be established for a message or an operation.
Since:
4.6.0
Author:
Stefan Dragisic, Jan Galinski
See Also:
  • Constructor Details

    • TenantNotResolvedException

      public TenantNotResolvedException(String message, Object... args)
      Construct a TenantNotResolvedException.
      Parameters:
      message - the message (template) for the exception
      args - the arguments for the message template
  • Method Details

    • tenantNotResolved

      public static Supplier<TenantNotResolvedException> tenantNotResolved(String message, Object... args)
      Returns a Supplier that creates a new TenantNotResolvedException with the given message and arguments, useful in lambda expressions or method references.
      Parameters:
      message - the message (template) for the exception
      args - the arguments for the message template
      Returns:
      a Supplier that creates a new TenantNotResolvedException with the given message and arguments
    • forTenantId

      public static TenantNotResolvedException forTenantId(String tenantId)
      Construct a TenantNotResolvedException referring to the given tenantId.
      Parameters:
      tenantId - the tenant identifier that could not be resolved
      Returns:
      a TenantNotResolvedException with a message indicating the tenant is unknown