trait BaseCantonError extends BaseError

The main Canton error for everything that should be logged and notified

In many cases, we return errors that are communicated to clients as a Left. For such cases, we should use CantonError to report them.

For an actual error instance, you should extend one of the given abstract error classes such as CantonError.Impl further below (or transaction error).

There are two ways to communicate such an error: write it into a log or send it as a string to the user. In most cases, we'll do both: log the error appropriately locally and communicate it to the user by failing the api call with an error string.

When we log the error, then we write: 1) ErrorCode 2) ErrorName (name of the class defining the error code) 3) The cause 4) The context

The context is given by the following: 1) All arguments of the error case class turned into strings (which invokes pretty printing of the arguments) EXCEPT: we ignore arguments that have the following RESERVED name: cause, loggingContext, throwable. 2) The context of the logger (e.g. participant=participant1, domain=da) 3) The trace id.

Linear Supertypes
Known Subclasses
Wrap, Error, Error, CantonConfigError, ExceptionBasedConfigError, Error, Error, Error, Error, CantonCommandError, ErrorWithException, NullError, Error, ErrorCanton, EnterpriseGrpcVaultServiceError, Failure, Failure, Failure, Failure, Failure, Failure, AuthenticationFailure, ChallengeFailure, AuthenticationFailure, ChallengeFailure, DomainTopologyManagerError, Failure, Failure, Failure, Failure, Reject, TopologyManagerParentError, Failure, Failure, TopologyDispatchingDegradation, SendRefused, SendTrackerTimeout, AsyncResultError, SendResultError, UnexpectedException, Impl, CantonError, Impl, GenericError, Reject, Reject, Reject, Reject, ParentCantonError, TransactionError, TransactionErrorImpl, TransactionParentError, Error, IdentityManagerParentError, CannotRemoveAdminWorkflowPackage, CannotRemoveOnlyDarForPackage, DarUnvettingError, MainPackageInUse, PackageInUse, PackageRemovalError, PackageVetted, ParticipantReplicationServiceError, Failure, Failure, PruningServiceError, Error, Error, Error, Error, Error, Error, DomainRegistryError, Error, Error, Error, Error, Error, Error, Error, Error, DeserializationFailure, FailedToAddParticipantDomainStateCert, InitialOnboardingError, InvalidResponse, InvalidState, TopologyHandshakeError, Error, Error, Error, Error, Error, Error, Error, Rejection, Error, Error, Error, Error, Rejection, Error, Error, SubmissionAlreadyInFlight, Rejection, Error, TransactionSubmissionError, MultipleCommitmentsInBatch, DeduplicationPeriodStartsTooEarlyErrorWithDuration, DeduplicationPeriodStartsTooEarlyErrorWithOffset, DuplicateCommandReject, Error, SyncDomainMigrationError, AliasManagerError, DuplicateConfig, FailedMigratingContracts, FailedReadingAcs, Generic, DomainIdAlreadyAssigned, ExpectedDomainIdsDiffer, InvalidDomainConfigStatus, SameDomainAlias, SourceAndTargetAreSame, SourceDomainIdUnknown, UnknownSourceDomain, MigrationParentError, SyncServiceError, Error, Error, Error, Error, UnrecoverableError, UnrecoverableException, Error, Error, SyncServiceFailedDomainConnection, DomainIsMissingInternally, Failure, InitError, MissingDomainConfig, UnknownDomainParameters, SyncServiceMigrationError, SyncServiceStartupError, Error, Failure, Error, Error, TransactionRoutingError, Failed, Generic, InputContractsNotOnDomain, NotAllInformeeAreOnDomain, Error, Error, Error, Error, Error, Error, Error, Error, IllformedTransaction, InputContractsOnDifferentDomains, SubmissionError, Error, Error, Error, NoSuitableDomain, NotAllowed, Error, Error, Error, Error, Error, Error, Failed, TransactionRoutingErrorWithDomain, ParticipantTopologyManagerError, Missing, AlienParticipant, NoSuchKey, Reject, Reject, Reject, IdentityManagerParentError, Reject, LocalReject, Reject, Reject, Reject, Reject, Reject, GenericReject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, LocalRejectImpl, Malformed, MediatorReject, DatabaseConnectionLost, DatabaseTaskRejected, Warn, Error, TopologyManagerError, Failure, Failure, PermanentlyInsecure, TemporarilyInsecure, CryptoPrivateError, CryptoPublicError, IncompatibleOpMapping, ReplaceExistingFailed, TopologySigningError, Failure, Failure, Failure, Element, Mapping, Failure, Failure, Failure, Failure, Warn, Failure, WarnDomain, WarnParticipant, WarnSequencerClient
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseCantonError
  2. BaseError
  3. LocationMixin
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def cause: String
    Definition Classes
    BaseError
  2. abstract def code: ErrorCode

    The error code, usually passed in as implicit where the error class is defined

    The error code, usually passed in as implicit where the error class is defined

    Definition Classes
    BaseCantonError → BaseError

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def asGrpcError(implicit loggingContext: ErrorLoggingContext): StatusRuntimeException
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def context: Map[String, String]
    Definition Classes
    BaseCantonError → BaseError
  8. def definiteAnswerO: Option[Boolean]
    Definition Classes
    BaseError
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. val location: Option[String]
    Definition Classes
    LocationMixin
  15. def log()(implicit loggingContext: ErrorLoggingContext): Unit
  16. def logWithContext(extra: Map[String, String])(implicit contextualizedErrorLogger: ContextualizedErrorLogger): Unit
    Definition Classes
    BaseError
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def resources: Seq[(ErrorResource, String)]
    Definition Classes
    BaseError
  21. def retryable: Option[ErrorCategoryRetry]
    Definition Classes
    BaseError
  22. def rpcStatus(overrideCode: Option[Code] = None)(implicit loggingContext: ErrorLoggingContext): Status
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def throwableO: Option[Throwable]
    Definition Classes
    BaseError
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from BaseError

Inherited from LocationMixin

Inherited from AnyRef

Inherited from Any

Ungrouped