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.

trait Errors
class Object
trait Matchable
class Any
trait Endpoints

Type members

Value members

Abstract methods

Response entity format for Invalid values

Response entity format for Invalid values

Response entity format for Throwable values

Response entity format for Throwable values

Concrete methods

final def clientErrorsToInvalid(clientErrors: ClientErrors): Invalid

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.

Inherited from:
Errors

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

Inherited from:
Errors