sealed trait TransportErrorCode extends Serializable

An error code that gets translated into an appropriate underlying error code.

This attempts to match up corresponding HTTP error codes with WebSocket close codes, so that user code can generically select a code without worrying about the underlying transport.

While most WebSocket close codes that we typically use do have a corresponding HTTP error code, there are many HTTP error codes that don't have a corresponding WebSocket close code. In these cases, we use the private WebSocket close code range (4xxx), with the HTTP error code as the last three digits. Such WebSocket close codes will be in the range 4400 to 4599.

This class should only be used to represent error codes, status codes like HTTP 200 should not be represented using this class. This is enforced for HTTP codes, since they have a well defined categorisation, codes between 400 and 599 are considered errors. It is however not enforced for WebSockets, since the WebSocket protocol defines no such categorisation of codes, it specifies a number of well known codes from 1000 to 1015, with no particular pattern to their meaning, and the remaining codes are only categorised by whether they are private, reserved for the WebSocket spec, or reserved for applications to specify.

For WebSocket close codes that are not known, or are not in the private range of 4400 to 4599 defined by us, this use class uses the generic HTTP 404 error code.

Source
Exceptions.scala
Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TransportErrorCode
  2. Serializable
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val description: String

    A description of this close code.

    A description of this close code.

    This description will be meaningful for known built in close codes, but for other codes, it will be Unknown error code

    returns

    A description of this closed code.

  2. abstract val http: Int

    The HTTP status code for this error.

  3. abstract val webSocket: Int

    The WebSocket close code for this error.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from TransportErrorCode to any2stringadd[TransportErrorCode] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (TransportErrorCode, B)
    Implicit
    This member is added by an implicit conversion from TransportErrorCode to ArrowAssoc[TransportErrorCode] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def ensuring(cond: (TransportErrorCode) ⇒ Boolean, msg: ⇒ Any): TransportErrorCode
    Implicit
    This member is added by an implicit conversion from TransportErrorCode to Ensuring[TransportErrorCode] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (TransportErrorCode) ⇒ Boolean): TransportErrorCode
    Implicit
    This member is added by an implicit conversion from TransportErrorCode to Ensuring[TransportErrorCode] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): TransportErrorCode
    Implicit
    This member is added by an implicit conversion from TransportErrorCode to Ensuring[TransportErrorCode] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): TransportErrorCode
    Implicit
    This member is added by an implicit conversion from TransportErrorCode to Ensuring[TransportErrorCode] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from TransportErrorCode to StringFormat[TransportErrorCode] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  27. def [B](y: B): (TransportErrorCode, B)
    Implicit
    This member is added by an implicit conversion from TransportErrorCode to ArrowAssoc[TransportErrorCode] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from TransportErrorCode to any2stringadd[TransportErrorCode]

Inherited by implicit conversion StringFormat from TransportErrorCode to StringFormat[TransportErrorCode]

Inherited by implicit conversion Ensuring from TransportErrorCode to Ensuring[TransportErrorCode]

Inherited by implicit conversion ArrowAssoc from TransportErrorCode to ArrowAssoc[TransportErrorCode]

Ungrouped