Skip to content

Commit

Permalink
add error msg for auth failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Conway committed Sep 28, 2009
1 parent 8ca947a commit 7ca7bec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/rubber/dns/zerigo.rb
Expand Up @@ -50,6 +50,11 @@ def refresh
@zone = self.class.get("/zones/#{zone_id}.xml")
else
zones = self.class.get('/zones.xml')
if zones.code < 200 ||zones.code > 299
msg = "Failed to access zerigo api (http_status=#{zones.code})"
msg += ", check customer_id/email/token in rubber.yml" if zones.code == 401
raise msg
end
@zone = zones["zones"].find {|z| z["domain"] == @domain }
end
end
Expand Down

0 comments on commit 7ca7bec

Please sign in to comment.