class LastbillClient::Error::Generic
@author ciappa_m@modulotech.fr Generic
error raised when Lastbill server send an unknown error. By default, it is considered to be an internal server error.
Constants
- DEFAULT_MESSAGE
The default error message
Attributes
error[R]
@return [String] if the server sent a custom error code @return [Symbol] if the server sent no code, it is the HTTP status sent by the server
status[R]
@return [Symbol] The HTTP status sent by the server
Public Class Methods
new(status: :internal_server_error, error: nil, message: DEFAULT_MESSAGE)
click to toggle source
Calls superclass method
# File lib/lastbill_client/error/generic.rb, line 20 def initialize(status: :internal_server_error, error: nil, message: DEFAULT_MESSAGE) super(message || DEFAULT_MESSAGE) @status = status || :internal_server_error @error = error || @status end