Class: Batches::APIException
- Inherits:
-
CoreLibrary::ApiException
- Object
- CoreLibrary::ApiException
- Batches::APIException
- Defined in:
- lib/batches/exceptions/api_exception.rb
Overview
Class for exceptions when there is a network error, status code error, etc.
Direct Known Subclasses
Batches400ErrorException, Batches401ErrorException, Batches403ErrorException, Batches500ErrorException, Batches501ErrorException, Batches502ErrorException, Batches504ErrorException, BatchesTransactions400ErrorException, BatchesTransactions401ErrorException, BatchesTransactions403ErrorException, BatchesTransactions500ErrorException, BatchesTransactions501ErrorException, BatchesTransactions502ErrorException, BatchesTransactions504ErrorException
Instance Method Summary collapse
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
16 17 18 19 |
# File 'lib/batches/exceptions/api_exception.rb', line 16 def inspect class_name = self.class.name.split('::').last "<#{class_name} status_code: #{@response_code.inspect}, reason: #{@reason.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
10 11 12 13 |
# File 'lib/batches/exceptions/api_exception.rb', line 10 def to_s class_name = self.class.name.split('::').last "<#{class_name} status_code: #{@response_code}, reason: #{@reason}>" end |