From a67d12dc59b3878008b93622efead1771b663153 Mon Sep 17 00:00:00 2001 From: Valeria Bulanova Date: Wed, 1 Nov 2023 13:08:45 +0300 Subject: [PATCH] Fix --- .../dl_file_uploader_lib/yadocs_client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: