diff --git a/lib/dl_file_uploader_lib/dl_file_uploader_lib/yadocs_client.py b/lib/dl_file_uploader_lib/dl_file_uploader_lib/yadocs_client.py index 1ab528df2..435e03908 100644 --- a/lib/dl_file_uploader_lib/dl_file_uploader_lib/yadocs_client.py +++ b/lib/dl_file_uploader_lib/dl_file_uploader_lib/yadocs_client.py @@ -1,6 +1,9 @@ from __future__ import annotations -from typing import Any +from typing import ( + Any, + Type, +) from aiohttp.client import ClientSession @@ -8,6 +11,8 @@ def yadocs_error_to_file_uploader_exception(status_code: int, resp_info: dict) -> file_upl_exc.DLFileUploaderBaseError: + err_cls: Type[file_upl_exc.DLFileUploaderBaseError] + if status_code == 401: err_cls = file_upl_exc.PermissionDenied elif status_code == 404: