Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vws/exceptions/custom_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class RecoCountsReportTimeoutError(Exception):


@beartype
class ServerError(Exception): # pragma: no cover
class ServerError(Exception):
"""Exception raised when VWS returns a server error."""

def __init__(self, response: Response) -> None:
Expand Down
13 changes: 4 additions & 9 deletions src/vws/exceptions/vws_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ def target_id(self) -> str:
return _target_id_from_url(url=self.response.url)


# This is not simulated by the mock.
@beartype
class DateRangeError(VWSError): # pragma: no cover
class DateRangeError(VWSError):
"""Exception raised when Vuforia returns a response with a result code
'DateRangeError'.
"""
Expand Down Expand Up @@ -171,16 +170,14 @@ def target_id(self) -> str:


@beartype
class TooManyRequestsError(VWSError): # pragma: no cover
class TooManyRequestsError(VWSError):
"""Exception raised when Vuforia returns a response with a result code
'TooManyRequests'.
"""


# This is not simulated by client code because the accept parameter uses
# the VuMarkAccept enum, which only allows valid values.
@beartype
class InvalidAcceptHeaderError(VWSError): # pragma: no cover
class InvalidAcceptHeaderError(VWSError):
"""Exception raised when Vuforia returns a response with a result code
``InvalidAcceptHeader``.
"""
Expand All @@ -193,10 +190,8 @@ class InvalidInstanceIdError(VWSError):
"""


# This is not simulated by client code because the request body
# is always valid JSON when using this client.
@beartype
class BadRequestError(VWSError): # pragma: no cover
class BadRequestError(VWSError):
"""Exception raised when Vuforia returns a response with a result code
``BadRequest``.
"""
Expand Down