mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Make provider errors more specific
This commit is contained in:
parent
29f445d75e
commit
dc17a0a298
3 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,9 @@
|
|||
class Provider::Openai < Provider
|
||||
include LlmProvider
|
||||
|
||||
# Subclass so errors caught in this provider are raised as Provider::Openai::Error
|
||||
Error = Class.new(Provider::Error)
|
||||
|
||||
MODELS = %w[gpt-4o]
|
||||
|
||||
def initialize(access_token)
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
class Provider::Synth < Provider
|
||||
include ExchangeRateProvider, SecurityProvider
|
||||
|
||||
# Subclass so errors caught in this provider are raised as Provider::Synth::Error
|
||||
Error = Class.new(Provider::Error)
|
||||
|
||||
def initialize(api_key)
|
||||
@api_key = api_key
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue