diff --git a/lib/easee/client.rb b/lib/easee/client.rb index 7f4e838..63c0d9a 100644 --- a/lib/easee/client.rb +++ b/lib/easee/client.rb @@ -128,7 +128,7 @@ def with_error_handling rescue Faraday::ForbiddenError => e raise Errors::Forbidden, "Access denied to charger" rescue Faraday::Error => e - if e.response_status == 400 && e.response.dig(:body, "errorCode") == 100 + if e.response_status == 400 && [100, 727].include?(e.response.dig(:body, "errorCode")) raise Errors::InvalidCredentials, "Invalid username or password" end