Reply

io.eezo.http.client.Reply
enum Reply

What one outbound call came back as: a closed set the caller matches exhaustively.

Four arms and no more. Denied (401/403) is first-class because it is the arm with a different action attached — refresh a token, surface a login — so the compiler asks every caller what happens when credentials die, which is the whole point of matching a total function over this enum rather than a PartialFunction that swallows what it does not name. Unreachable is separate from Failed because "the server answered badly" and "no HTTP happened at all" recover differently. Nothing here throws for an ordinary failure; a Reply is a value, whatever happened.

Attributes

Source
Http.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Denied(response: Received)

401 or 403: the credentials are wrong, expired, or missing.

401 or 403: the credentials are wrong, expired, or missing.

Attributes

Source
Http.scala
final case class Failed(response: Received)

Any other status: the server answered, and the answer was no.

Any other status: the server answered, and the answer was no.

Attributes

Source
Http.scala
final case class Ok(response: Received)

2xx: what the caller hoped for.

2xx: what the caller hoped for.

Attributes

Source
Http.scala
final case class Unreachable(reason: String)

No response at all: DNS, connect refused, timeout, TLS. The reason is for the log — there is no status to branch on because no HTTP happened.

No response at all: DNS, connect refused, timeout, TLS. The reason is for the log — there is no status to branch on because no HTTP happened.

Attributes

Source
Http.scala