added exception for invalid/no api key

This commit is contained in:
danijoo
2014-01-01 22:41:49 +01:00
parent 80aba28864
commit 2b77b1443f
3 changed files with 7 additions and 2 deletions

View File

@@ -28,9 +28,11 @@ class SightstoneBaseModule
raise Sightstone::SightstoneConnectionException
elsif response_code == 429
raise Sightstone::RateLimitExceededException
elsif response_code == 401
raise Sightstone::InvalidApiKeyException
else
raise Sightstone::SightstoneApiException 'Unknown error occured'
end
end
end
end