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, Warn, SigningTolerance, TopologyManagerId, Warn, Error, Error, AuthenticationFailure, ChallengeFailure, AuthenticationFailure, ChallengeFailure, DomainTopologyManagerError, Failure, Failure, Failure, TopologyManagerParentError, Failure, TopologyDispatchingDegradation, SendRefused, SendTrackerTimeout, AsyncResultError, SendResultError, UnexpectedException, CantonError, Impl, LoggingTransactionErrorImpl, ParentCantonError, TransactionError, TransactionErrorImpl, TransactionErrorWithEnum, TransactionErrorWithEnumImpl, TransactionParentError, Error, IdentityManagerParentError, PackageInUse, PackageRemovalError, PackageVetted, ParticipantReplicationServiceError, Failure, Failure, PruningServiceError, Error, Error, Error, Error, DomainRegistryError, Error, Error, Error, Error, Error, Error, Error, Error, DeserializationFailure, FailedToAddParticipantDomainStateCert, IdentityHandshakeError, InvalidResponse, InvalidState, Error, Error, Error, Error, Error, Rejection, Error, Error, Error, Error, Error, Error, SubmissionAlreadyInFlight, Rejection, Error, TransactionSubmissionError, MultipleCommitmentsInBatch, Mismatch, Mismatch, DeduplicationPeriodStartsTooEarlyErrorWithDuration, DeduplicationPeriodStartsTooEarlyErrorWithOffset, DuplicateCommandReject, Error, SyncServiceError, Error, Error, Error, UnrecoverableError, UnrecoverableException, SyncServiceFailedDomainConnection, DomainIsMissingInternally, Failure, InitError, MissingDomainConfig, UnknownDomainParameters, SyncServiceStartupError, Error, Failure, Error, Error, TransactionRoutingError, Failed, Error, Error, Error, Error, Error, IllformedTransaction, InputContractsOnDifferentDomains, SubmissionError, Error, Error, NoSuitableDomain, NotAllowed, Error, Error, Error, Error, ParticipantTopologyManagerError, Missing, AlienParticipant, NoSuchKey, Reject, Reject, IdentityManagerParentError, Reject, LocalReject, Reject, Reject, Reject, Reject, Reject, Reject, LocalVerdictError, Malformed, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, Reject, MediatorReject, Reject, Reject, Reject, Reject, Reject, Reject, MediatorRejectError, DatabaseTaskRejected, Warn, Error, TopologyManagerError, Failure, Failure, CryptoPrivateError, CryptoPublicError, IncompatibleOpMapping, ReplaceExistingFailed, TopologySigningError, Failure, Failure, Failure, Element, Mapping, Failure, Failure, Failure, Failure
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

    A human readable string indicating the error

    A human readable string indicating the error

    Definition Classes
    BaseCantonError → 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 asGrpcErrorFromContext(implicit contextualizedErrorLogger: ContextualizedErrorLogger): StatusRuntimeException
    Definition Classes
    BaseError
  5. def asGrpcStatusFromContext(implicit contextualizedErrorLogger: ContextualizedErrorLogger): Status
    Definition Classes
    BaseError
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def context: Map[String, String]
    Definition Classes
    BaseError
  9. def definiteAnswerO: Option[Boolean]
    Definition Classes
    BaseError
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. val location: Option[String]
    Definition Classes
    LocationMixin
  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. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def throwableO: Option[Throwable]
    Definition Classes
    BaseError
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. 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