class Mailjet::RequestException

Overview

The error info value may return anything from a string to an array of hashes, so some juggling is needed to drill down to the actual errors. Here is an example:

case exception.error_info
when String
  puts exception.error_info
when Mailjet::Exception::ErrorInfoArray
  if contactslists = exception.error_info["ContactsLists"]?
    puts contactslists.map(&.["Error"]).join(", ")
  end
end

Direct Known Subclasses

Defined in:

mailjet/exception.cr

Instance Method Summary

Instance Method Detail

def message #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]