class ZanoxPublisher::ZanoxError
Represents a Zanox Product
API error. Contains specific data about the error.
Attributes
data[R]
Public Class Methods
new(data)
click to toggle source
Calls superclass method
# File lib/zanox_publisher/connection.rb, line 10 def initialize(data) @data = data # should contain Code, Message, and Reason code = data['code'].to_s message = data['message'].to_s reason = data['reason'].to_s super "The Zanox Product API responded with the following error message: #{message} Error reason: #{reason} [code: #{code}]" end