Class: MoexRuby::ErrorHandler
- Inherits:
-
Object
- Object
- MoexRuby::ErrorHandler
- Defined in:
- lib/moex_ruby/error_handler.rb
Constant Summary collapse
- ERROR_MAPPING =
{ Faraday::TimeoutError => TimeoutError, Faraday::ConnectionFailed => ConnectionError, Faraday::ClientError => ClientError, Faraday::ServerError => ServerError }.freeze
Class Method Summary collapse
Class Method Details
.handle(faraday_error) ⇒ Object
15 16 17 18 |
# File 'lib/moex_ruby/error_handler.rb', line 15 def self.handle(faraday_error) error = build_error(faraday_error) raise error end |
.handled_errors ⇒ Object
20 21 22 |
# File 'lib/moex_ruby/error_handler.rb', line 20 def self.handled_errors ERROR_MAPPING.keys end |