Nostrum v0.4.0 Nostrum.Error.ApiError exception View Source

Represents a failed response from the API.

This occurs when hackney or HTTPoison fail, or when the API doesn't respond with 200 or 204. This should only occur when using the banged API methods.

Link to this section Summary

Link to this section Types

Link to this type

detailed_error() View Source
detailed_error() :: %{
  code: discord_status_code(),
  message: String.t(),
  errors: errors()
}

Link to this type

discord_status_code() View Source
discord_status_code() :: 10001..90001

Link to this type

error() View Source
error() :: %{code: discord_status_code(), message: String.t()}

Link to this type

error_list_map() View Source
error_list_map() :: %{_errors: [error()]}

Link to this type

errors() View Source
errors() ::
  %{required(String.t()) => errors()}
  | %{required(String.t()) => error_list_map()}

Link to this type

status_code() View Source
status_code() :: 100..511

Link to this type

t() View Source
t() :: %{status_code: status_code(), response: response()}