Exception: Beanstream::InvalidRequestException

Inherits:
BeanstreamException show all
Defined in:
lib/beanstream/exceptions.rb

Instance Attribute Summary

Attributes inherited from BeanstreamException

#category, #code, #http_status_code, #message

Instance Method Summary collapse

Constructor Details

#initialize(code, category, message, http_status_code) ⇒ InvalidRequestException

Returns a new instance of InvalidRequestException.



41
42
43
# File 'lib/beanstream/exceptions.rb', line 41

def initialize(code, category, message, http_status_code)
  super(code, category, message, http_status_code)
end

Instance Method Details

#is_user_errorObject



45
46
47
48
49
50
51
52
53
# File 'lib/beanstream/exceptions.rb', line 45

def is_user_error()
  if (@category ==1)
    true
  elsif (@category == 3 && code == 52)
    true
  else
    false
  end
end

#user_facing_messageObject



55
56
57
58
59
60
61
# File 'lib/beanstream/exceptions.rb', line 55

def user_facing_message()
  if (is_user_error())
    return @message
  else
    super
  end
end