BuiltInErrors

endpoints4s.algebra.BuiltInErrors
trait BuiltInErrors extends Errors

Interpreter for the Errors algebra that uses endpoints4s built-in error types:

  • Invalid for client errors,
  • and Throwable for server error.

Both types of errors are serialized into a JSON array containing string error values.

Attributes

Graph
Supertypes
trait Errors
class Object
trait Matchable
class Any
Known subtypes
trait Endpoints
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

Response entity format for Invalid values

Response entity format for Invalid values

Attributes

Response entity format for Throwable values

Response entity format for Throwable values

Attributes

Concrete methods

final def clientErrorsToInvalid(clientErrors: ClientErrors): Invalid

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

final 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

Convert the endpoints4s internal server error type into the ServerError type

Convert the endpoints4s internal server error type into the ServerError type

Attributes

Inherited 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

Inherited from:
Errors
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

Inherited from:
Errors