diff --git a/src/python3_captchaai/core/base.py b/src/python3_captchaai/core/base.py index 8fc8bfd5..7d084c1b 100644 --- a/src/python3_captchaai/core/base.py +++ b/src/python3_captchaai/core/base.py @@ -134,8 +134,6 @@ def _get_result(self, url_postfix: str = EndpointPostfixEnm.GET_TASK_RESULT.valu if result_data.status in (ResponseStatusEnm.Ready, ResponseStatusEnm.Failed): # if captcha ready\failed or have unknown status - return exist data return result_data - elif resp.status_code == 401: - raise ValueError("Authentication failed, indicating that the API key is not correct") else: raise ValueError(resp.raise_for_status()) except Exception as error: @@ -208,8 +206,6 @@ async def _aio_get_result(self, url_postfix: str = EndpointPostfixEnm.GET_TASK_R if result_data.status in (ResponseStatusEnm.Ready, ResponseStatusEnm.Failed): # if captcha ready\failed or have unknown status - return exist data return result_data - elif resp.status == 401: - raise ValueError("Authentication failed, indicating that the API key is not correct") else: raise ValueError(resp.reason) except Exception as error: