Packages

abstract class ErrorCode extends AnyRef

Error Code Definition

We want to support our users and our developers with good error codes. Therefore, every error that an API returns should refer to a documented error code and provide some context information.

Every error code is uniquely identified using an error-id of max 63 CAPITALIZED_WITH_UNDERSCORES characters

Errors are organised according to ErrorGroups. And we separate the error code definition (using a singleton by virtue of using objects to express the nested hierarchy) and the actual error.

Please note that there is some implicit argument passing involved in the example below:

object SyncServiceErrors extends ParticipantErrorGroup { object ConnectionErrors extends ErrorGroup { object DomainUnavailable extends ErrorCode(id="DOMAIN_UNAVAILABLE", ..) { case class ActualError(someContext: Val) extends BaseError with SyncServiceError // this error will actually be referring to the same error code! case class OtherError(otherContext: Val) extends BaseError with SyncServiceError } } object HandshakeErrors extends ErrorGroup { ... } }

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ErrorCode
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ErrorCode(id: String, category: ErrorCategory)(implicit parent: ErrorClass)

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(err: BaseError)(implicit loggingContext: ContextualizedErrorLogger): StatusRuntimeException
  5. def asGrpcStatus(err: BaseError)(implicit loggingContext: ContextualizedErrorLogger): Status
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val category: ErrorCategory
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  9. implicit val code: ErrorCode
  10. def codeStr(correlationId: Option[String]): String

    The machine readable error code string, uniquely identifiable by the error id, error category and correlation id.

    The machine readable error code string, uniquely identifiable by the error id, error category and correlation id. e.g. NO_DOMAINS_CONNECTED(2,ABC234)

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def exposedViaApi: Boolean

    True if this error may appear on the API

    True if this error may appear on the API

    Attributes
    protected
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. val id: String
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def logLevel: Level

    Log level of the error code

    Log level of the error code

    Generally, the log level is defined by the error category. In rare cases, it might be overridden by the error code.

  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  22. implicit val parent: ErrorClass
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toMsg(cause: => String, correlationId: Option[String]): String

    returns

    message including error category id, error code id, correlation id and cause

  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 AnyRef

Inherited from Any

Ungrouped