Estated v0.2.0 Estated.Error View Source

Errors happen either because a problem occured with the key or the request. The level at which the result provides an error differs based on where the error occurs within the request. Error codes will be provided in an error response.

Link to this section Summary

Types

Code describing the type of error that occurred.

Description of the error.

Metadata related to the error.

The HTTP status code.

t()

Error response.

Title of the error.

Link to this section Types

Link to this type

code()

View Source (since 0.1.0)
code() :: String.t()

Code describing the type of error that occurred.

Eg. APE01

Link to this type

description()

View Source (since 0.1.0)
description() :: String.t()

Description of the error.

Eg. An exception occurred when attempting to process your request

Link to this type

metadata()

View Source (since 0.1.0)
metadata() :: map()

Metadata related to the error.

Link to this type

status_code()

View Source (since 0.1.0)
status_code() :: pos_integer()

The HTTP status code.

Eg. 500

Link to this type

t()

View Source (since 0.1.0)
t() :: %Estated.Error{
  code: code() | nil,
  description: description() | nil,
  metadata: metadata() | nil,
  status_code: status_code() | nil,
  title: title() | nil
}

Error response.

Link to this type

title()

View Source (since 0.1.0)
title() :: String.t()

Title of the error.

Eg. Internal Server Error