1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 21:15:19 +02:00

Implement Synth as an exchange rate provider (#574)

* Implement Synth as an exchange rate provider

* Add assertions to provider interface test

* Assert the correct provider error is raised

* Remove unnecessary parens
This commit is contained in:
Jose Farias 2024-03-27 09:16:00 -06:00 committed by GitHub
parent a1b25f1c5b
commit 7ae25dd6df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 310 additions and 34 deletions

View file

@ -0,0 +1,18 @@
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