Errors

endpoints4s.algebra.Errors
trait Errors

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

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

The ServerError type is used by endpoints4s 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.

Attributes

See also
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type

Members list

Type members

Types

Errors in a request built by a client

Errors in a request built by a client

Attributes

Error raised by the business logic of a server

Error raised by the business logic of a server

Attributes

Value members

Abstract methods

Format of the response entity carrying the client errors.

Format of the response entity carrying the client errors.

Attributes

Convert the ClientErrors type into the endpoints4s internal client error type

Convert the ClientErrors type into the endpoints4s internal client error type

Attributes

Convert the endpoints4s internal client error type into the ClientErrors type

Convert the endpoints4s internal client error type into the ClientErrors type

Attributes

Format of the response entity carrying the server error.

Format of the response entity carrying the server error.

Attributes

def serverErrorToThrowable(serverError: ServerError): Throwable

Convert the ServerError type into the endpoints4s internal server error type

Convert the ServerError type into the endpoints4s internal server error type

Attributes

def throwableToServerError(throwable: Throwable): ServerError

Convert the endpoints4s internal server error type into the ServerError type

Convert the endpoints4s internal server error type into the ServerError type

Attributes

Concrete fields

Response used by endpoints4s when decoding a request fails.

Response used by endpoints4s when decoding a request fails.

The provided implementation forwards to badRequest.

Attributes

lazy val serverErrorResponse: <none>[ServerError]

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

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

The provided implementation forwards to internalServerError

Attributes