File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -20,4 +20,5 @@ Gem::Specification.new do |s|
2020 s . add_dependency 'faraday' , '~> 0.9'
2121 s . add_dependency 'faraday_middleware' , '~> 0.9.0'
2222 s . add_dependency 'oauth2' , '~>0.9'
23+ s . add_dependency 'cortex-exceptions' , '~> 0.0.3'
2324end
Original file line number Diff line number Diff line change @@ -30,8 +30,12 @@ def initialize(hasharg)
3030 end
3131
3232 def get_cc_token
33- client = OAuth2 ::Client . new ( @key , @secret , site : @base_url )
34- client . client_credentials . get_token
33+ begin
34+ client = OAuth2 ::Client . new ( @key , @secret , site : @base_url )
35+ client . client_credentials . get_token
36+ rescue Faraday ::ConnectionFailed => e
37+ raise Cortex ::Exceptions ::ConnectionFailed ( base_url : @base_url )
38+ end
3539 end
3640 end
3741end
You can’t perform that action at this time.
0 commit comments