Bolty.Error exception
(Bolty v0.2.0)
Copy Markdown
Summary
Types
Functions
Return the code for the given error.
Examples
iex> {:error, %Bolty.Error{} = error} = do_something()
iex> Exception.message(error)
"Unable to perform this action."
Gets the corresponding atom based on the error code.
An atom code is already resolved and passes through unchanged; this lets
callers build an error map with a known atom code (e.g.
%{code: :unsupported_message_version, message: ...}) without it being
collapsed to :unknown by the string lookup.