Exception: Beanstream::InvalidRequestException
- Inherits:
-
BeanstreamException
- Object
- StandardError
- BeanstreamException
- Beanstream::InvalidRequestException
- Defined in:
- lib/beanstream/exceptions.rb
Instance Attribute Summary
Attributes inherited from BeanstreamException
#category, #code, #http_status_code, #message
Instance Method Summary collapse
-
#initialize(code, category, message, http_status_code) ⇒ InvalidRequestException
constructor
A new instance of InvalidRequestException.
- #is_user_error ⇒ Object
- #user_facing_message ⇒ Object
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, , http_status_code) super(code, category, , http_status_code) end |
Instance Method Details
#is_user_error ⇒ Object
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_message ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/beanstream/exceptions.rb', line 55 def () if (is_user_error()) return @message else super end end |