Skip to content

Commit 7976729

Browse files
authored
Paperless-ngx: Retry setup on initialization error (home-assistant#149476)
1 parent 5aa0d0d commit 7976729

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

homeassistant/components/paperless_ngx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def _get_paperless_api(
9696
translation_key="forbidden",
9797
) from err
9898
except InitializationError as err:
99-
raise ConfigEntryError(
99+
raise ConfigEntryNotReady(
100100
translation_domain=DOMAIN,
101101
translation_key="cannot_connect",
102102
) from err

tests/components/paperless_ngx/test_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async def test_load_config_status_forbidden(
6363
"user_inactive_or_deleted",
6464
),
6565
(PaperlessForbiddenError(), ConfigEntryState.SETUP_ERROR, "forbidden"),
66-
(InitializationError(), ConfigEntryState.SETUP_ERROR, "cannot_connect"),
66+
(InitializationError(), ConfigEntryState.SETUP_RETRY, "cannot_connect"),
6767
],
6868
)
6969
async def test_setup_config_error_handling(

0 commit comments

Comments
 (0)