Exception: PaystackSdk::ServerError

Inherits:
APIError show all
Defined in:
lib/paystack_sdk.rb

Overview

Raised when the server returns a 5xx error

Instance Attribute Summary collapse

Instance Method Summary collapse

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, message = "An error occurred on the Paystack server")
  @status_code = status_code
  super("#{message} (Status: #{status_code})")
end

Instance Attribute Details

#status_codeObject (readonly)

Returns the value of attribute status_code.



84
85
86
# File 'lib/paystack_sdk.rb', line 84

def status_code
  @status_code
end