Exception: PaystackSdk::ServerError
- Defined in:
- lib/paystack_sdk.rb
Overview
Raised when the server returns a 5xx error
Instance Attribute Summary collapse
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code, message = "An error occurred on the Paystack server") ⇒ ServerError
constructor
A new instance of ServerError.
Constructor Details
#initialize(status_code, message = "An error occurred on the Paystack server") ⇒ ServerError
Returns a new instance of ServerError.
86 87 88 89 |
# File 'lib/paystack_sdk.rb', line 86 def initialize(status_code, = "An error occurred on the Paystack server") @status_code = status_code super("#{message} (Status: #{status_code})") end |
Instance Attribute Details
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
84 85 86 |
# File 'lib/paystack_sdk.rb', line 84 def status_code @status_code end |