Sha256: d5a282f87bce48a3471e5690f4237d6ac252fc87b14559c66e192263efa3e04c
Contents?: true
Size: 603 Bytes
Versions: 8
Compression:
Stored size: 603 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
8 entries across 8 versions & 1 rubygems