class TelphinApi::Error
An exception raised by `TelphinApi::Result` when given a response with an error.
Attributes
error_code[R]
An error code. @return [String]
Public Class Methods
new(data)
click to toggle source
An exception is initialized by the data from response mash. @param [Hash] data Error
data.
# File lib/telphin_api/error.rb, line 10 def initialize(data) @error_code = data.code @error_msg = data.message end
Public Instance Methods
message()
click to toggle source
A full description of the error. @return [String]
# File lib/telphin_api/error.rb, line 17 def message "Telphin returned an error #{@error_code}: '#{@error_msg}'" end