Skip to content

Commit

Permalink
Also InvalidCredentials upon error code 727
Browse files Browse the repository at this point in the history
  • Loading branch information
bforma committed Feb 12, 2024
1 parent 4c4fc7b commit c16cb0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/easee/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c16cb0f

Please sign in to comment.