Skip to content

Commit afd61af

Browse files
Merge pull request #885 from adamtheturtle/fail
Document Fails
2 parents a22cec9 + 4977db2 commit afd61af

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/vws/vws.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ def add_target(
202202
203203
Returns:
204204
The target ID of the new target.
205+
206+
Raises:
207+
~vws.exceptions.Fail: There was an error with the request. For
208+
example, the given access key does not match a known database.
205209
"""
206210
image_data = image.getvalue()
207211
image_data_encoded = base64.b64encode(image_data).decode('ascii')
@@ -244,6 +248,8 @@ def get_target_record(self, target_id: str) -> Dict[str, Union[str, int]]:
244248
Response details of a target from Vuforia.
245249
246250
Raises:
251+
~vws.exceptions.Fail: There was an error with the request. For
252+
example, the given access key does not match a known database.
247253
~vws.exceptions.UnknownTarget: The given target ID does not match a
248254
target in the database.
249255
"""
@@ -266,6 +272,8 @@ def wait_for_target_processed(self, target_id: str) -> None:
266272
target_id: The ID of the target to wait for.
267273
268274
Raises:
275+
~vws.exceptions.Fail: There was an error with the request. For
276+
example, the given access key does not match a known database.
269277
TimeoutError: The target remained in the processing stage for more
270278
than five minutes.
271279
~vws.exceptions.UnknownTarget: The given target ID does not match a
@@ -290,6 +298,10 @@ def list_targets(self) -> List[str]:
290298
291299
Returns:
292300
The IDs of all targets in the database.
301+
302+
Raises:
303+
~vws.exceptions.Fail: There was an error with the request. For
304+
example, the given access key does not match a known database.
293305
"""
294306
response = self._make_request(
295307
method='GET',
@@ -317,6 +329,8 @@ def get_target_summary_report(
317329
Details of the target.
318330
319331
Raises:
332+
~vws.exceptions.Fail: There was an error with the request. For
333+
example, the given access key does not match a known database.
320334
~vws.exceptions.UnknownTarget: The given target ID does not match a
321335
target in the database.
322336
"""
@@ -338,6 +352,10 @@ def get_database_summary_report(self) -> Dict[str, Union[str, int]]:
338352
339353
Returns:
340354
Details of the database.
355+
356+
Raises:
357+
~vws.exceptions.Fail: There was an error with the request. For
358+
example, the given access key does not match a known database.
341359
"""
342360
response = self._make_request(
343361
method='GET',
@@ -359,6 +377,8 @@ def delete_target(self, target_id: str) -> None:
359377
target_id: The ID of the target to delete.
360378
361379
Raises:
380+
~vws.exceptions.Fail: There was an error with the request. For
381+
example, the given access key does not match a known database.
362382
~vws.exceptions.UnknownTarget: The given target ID does not match a
363383
target in the database.
364384
"""

0 commit comments

Comments
 (0)