Bamboo.ApiError exception (bamboo v2.3.0) View Source

Error used to represent a problem when sending emails through an external email service API.

Link to this section Summary

Link to this section Functions

Link to this function

build_api_error(message)

View Source
Link to this function

build_api_error(service_name, response, params, extra_message \\ "")

View Source
Link to this function

raise_api_error(message)

View Source

Raises an ApiError with the given message or service_name, response and params.

An extra error message can be added using a fourth parameter extra_message.

Examples

iex> raise_api_error("Error message")
** (Bamboo.ApiError) Error Message

iex> raise_api_error(service_name, response, params)
** (Bamboo.ApiError) There was a problem sending the email through the <service_name> API.

Here is the response:

"<response>"

Here are the params we sent:

"<params>"

iex> raise_api_error(service_name, response, params, extra_message)
** (Bamboo.ApiError) There was a problem sending the email through the <service_name> API.

Here is the response:

"<response>"

Here are the params we sent:

"<params>"

<extra_message>
Link to this function

raise_api_error(service_name, response, params, extra_message \\ "")

View Source