View Source Nostrum.Error.ApiError exception (Nostrum v0.6.1)
Represents a failed response from the API.
This occurs when :gun
fails, 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
Specs
detailed_error() :: %{ code: discord_status_code(), message: String.t(), errors: errors() }
Specs
discord_status_code() :: 10001..90001
Specs
error() :: %{code: discord_status_code(), message: String.t()}
Specs
error_list_map() :: %{_errors: [error()]}
Specs
errors() :: %{required(String.t()) => errors()} | %{required(String.t()) => error_list_map()}
Specs
response() :: String.t() | error() | detailed_error()
Specs
status_code() :: 100..511
Specs
t() :: %{status_code: status_code(), response: response()}