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.
- See also:
Type members
Types
Error raised by the business logic of a server
Error raised by the business logic of a server
Value members
Abstract methods
Format of the response entity carrying the client errors.
Format of the response entity carrying the client errors.
Convert the ClientErrors type into the endpoints4s internal client error type
Convert the ClientErrors type into the endpoints4s internal client error type
Convert the endpoints4s internal client error type into the ClientErrors type
Convert the endpoints4s internal client error type into the ClientErrors type
Format of the response entity carrying the server error.
Format of the response entity carrying the server error.
Convert the ServerError type into the endpoints4s internal server error type
Convert the ServerError type into the endpoints4s internal server error type
Convert the endpoints4s internal server error type into the ServerError type
Convert the endpoints4s internal server error type into the ServerError type
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.