mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-21 22:29:38 +02:00
* Implement Synth as an exchange rate provider * Add assertions to provider interface test * Assert the correct provider error is raised * Remove unnecessary parens
18 lines
350 B
Ruby
18 lines
350 B
Ruby
|
|
class Provider::Base
|
|
ProviderError = Class.new(StandardError)
|
|
|
|
TRANSIENT_NETWORK_ERRORS = [
|
|
Faraday::TimeoutError,
|
|
Faraday::ConnectionFailed,
|
|
Faraday::SSLError,
|
|
Faraday::ClientError,
|
|
Faraday::ServerError
|
|
]
|
|
|
|
class << self
|
|
def known_transient_errors
|
|
TRANSIENT_NETWORK_ERRORS + [ ProviderError ]
|
|
end
|
|
end
|
|
end
|