Sha256: 5248ffd6ee8fbbf095545f051c68423ee27d2f4bf0eac31fce9292cd78414a33
Contents?: true
Size: 604 Bytes
Versions: 7
Compression:
Stored size: 604 Bytes
Contents
module Twilio module REST class TwilioError < StandardError attr_reader :message, :body def initialize(message, body = nil) @message = message @body = body end def to_s "#{@message}: #{@body || 'no body'}" end end class RestError < TwilioError attr_reader :message, :code, :status_code def initialize(message, code, status_code) @message = message @code = code @status_code = status_code end def to_s "[HTTP #{status_code}] #{code} : #{message}" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems