-
-
Notifications
You must be signed in to change notification settings - Fork 37.5k
Fix hardcoded exception strings in uptimerobot #171744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,11 +48,16 @@ | |
| try: | ||
| response = await self.api.async_get_monitors() | ||
| except UptimeRobotAuthenticationException as exception: | ||
| # pylint: disable-next=home-assistant-exception-not-translated | ||
| raise ConfigEntryAuthFailed(exception) from exception | ||
| raise ConfigEntryAuthFailed( | ||
|
chemelli74 marked this conversation as resolved.
|
||
| translation_domain=DOMAIN, | ||
| translation_key="api_authentication_exception", | ||
| ) from exception | ||
| except UptimeRobotException as exception: | ||
| # pylint: disable-next=home-assistant-exception-not-translated | ||
| raise UpdateFailed(exception) from exception | ||
| raise UpdateFailed( | ||
|
Check failure on line 56 in homeassistant/components/uptimerobot/coordinator.py
|
||
| translation_domain=DOMAIN, | ||
| translation_key="api_exception", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The string for "api_exception" is specific for turning on/off monitoring; it is not suitable for use here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh indeed |
||
| translation_placeholders={"error": "Generic UptimeRobot exception"}, | ||
|
frenck marked this conversation as resolved.
Outdated
|
||
| ) from exception | ||
|
Comment on lines
+56
to
+60
|
||
|
|
||
| if TYPE_CHECKING: | ||
| assert isinstance(response.data, list) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.