class Mailjet::RequestException
- Mailjet::RequestException
- Mailjet::Exception
- Exception
- Reference
- Object
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.crConstructors
Instance Method Summary
- #error_info : Exception::ErrorInfo
- #error_info=(_error_info : Exception::ErrorInfo)
- #error_message : Union(String, Nil)
- #error_message=(_error_message : Union(String, Nil))
- #message
- #status_code : Union(Int32, Nil)
- #status_code=(_status_code : Union(Int32, Nil))
- #to_json(json : JSON::Builder)
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
Constructor Detail
Instance Method Detail
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
.