Skip to content
Browse files

catch some more standard exceptions

  • Loading branch information...
1 parent 9886c47 commit 6b05febde2a4e2edeef7bcf23604a33725f981fb @technoweenie technoweenie committed Oct 6, 2011
Showing with 6 additions and 0 deletions.
  1. +2 −0 services/basecamp.rb
  2. +4 −0 services/campfire.rb
View
2 services/basecamp.rb
@@ -63,6 +63,8 @@ def receive_push
else
raise
end
+ rescue ActiveResource::ForbiddenAccess => boom
+ raise_config_error boom.to_s
rescue RuntimeError => boom
if boom.to_s =~ /\((?:403|401|422)\)/
raise_config_error "Invalid credentials: #{boom}"
View
4 services/campfire.rb
@@ -31,6 +31,10 @@ def receive_push
room.play "rimshot" if play_sound && room.respond_to?(:play)
campfire.logout
+ rescue OpenSSL::SSL::SSLError => boom
+ raise_config_error "SSL Error: #{boom}"
+ rescue Tinder::AuthenticationFailed => boom
+ raise_config_error "Authentication Error: #{boom}"
rescue Faraday::Error::ConnectionFailed
raise_config_error "Connection refused- invalid campfire subdomain."
end

0 comments on commit 6b05feb

Please sign in to comment.
Something went wrong with that request. Please try again.