Trait

endpoints.algebra

Errors

Related Doc: package algebra

Permalink

trait Errors extends AnyRef

Defines the error types used to model client and server errors.

The ClientErrors type is used by endpoints to model errors coming from the client (missing query parameter, invalid entity, etc.).

The ServerError type is used by endpoints to model errors coming from the server business logic.

The badRequest and internalServerError operations defined in Responses define responses carrying entities of type ClientErrors and ServerError, respectively.

Interpreters are expected to use the clientErrorsResponse and serverErrorResponse operations defined here to handle client and server errors, respectively.

Self Type
Errors with Responses
Source
Errors.scala
See also

BuiltInErrors

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Errors
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type ClientErrors

    Permalink

    Errors in a request built by a client

  2. abstract type ServerError

    Permalink

    Error raised by the business logic of a server

Abstract Value Members

  1. abstract def clientErrorsResponseEntity: (Errors.this)#ResponseEntity[(Errors.this)#ClientErrors]

    Permalink

    Format of the response entity carrying the client errors.

  2. abstract def clientErrorsToInvalid(clientErrors: (Errors.this)#ClientErrors): Invalid

    Permalink
  3. abstract def invalidToClientErrors(invalid: Invalid): (Errors.this)#ClientErrors

    Permalink
  4. abstract def serverErrorResponseEntity: (Errors.this)#ResponseEntity[(Errors.this)#ServerError]

    Permalink

    Format of the response entity carrying the server error.

  5. abstract def serverErrorToThrowable(serverError: (Errors.this)#ServerError): Throwable

    Permalink
  6. abstract def throwableToServerError(throwable: Throwable): (Errors.this)#ServerError

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. lazy val clientErrorsResponse: (Errors.this)#Response[(Errors.this)#ClientErrors]

    Permalink

    Response used by the endpoints library when decoding a request fails.

    Response used by the endpoints library when decoding a request fails.

    The provided implementation forwards to badRequest.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. lazy val serverErrorResponse: (Errors.this)#Response[(Errors.this)#ServerError]

    Permalink

    Response used by the endpoints library when the business logic of an endpoint fails.

    Response used by the endpoints library when the business logic of an endpoint fails.

    The provided implementation forwards to internalServerError

  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped