Remove useless and redundant docstrings from custom exceptions.

This commit is contained in:
Davide Casale
2023-10-26 06:41:42 +02:00
parent c02d6d7bf8
commit b082891c41
7 changed files with 40 additions and 70 deletions

View File

@@ -6,7 +6,9 @@ from http import HTTPStatus
import time, hmac, hashlib, json, requests
from ..exceptions import ResourceNotFound, RequestParametersError, InvalidCredentialError, UnknownGenericError
from ..exceptions import NotFoundError, RequestParametersError, UnknownGenericError
from ...exceptions import InvalidCredentialError
from ..._utils.json_encoder import JSONEncoder
from ..._utils.json_decoder import JSONDecoder
@@ -55,7 +57,7 @@ class Middleware:
)
if response.status_code == HTTPStatus.NOT_FOUND:
raise ResourceNotFound(f"No resources found at endpoint <{endpoint}>.")
raise NotFoundError(f"No resources found at endpoint <{endpoint}>.")
data = response.json(cls=JSONDecoder)
@@ -88,7 +90,7 @@ class Middleware:
)
if response.status_code == HTTPStatus.NOT_FOUND:
raise ResourceNotFound(f"No resources found at endpoint <{endpoint}>.")
raise NotFoundError(f"No resources found at endpoint <{endpoint}>.")
data = response.json(cls=JSONDecoder)