File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -350,6 +350,16 @@ def response(self) -> Response:
350
350
"""
351
351
return self ._response
352
352
353
+ @property
354
+ def target_id (self ) -> str :
355
+ """
356
+ The unknown target ID.
357
+ """
358
+ path = urlparse (self .response .url ).path
359
+ # Every HTTP path which can raise this error is in the format
360
+ # `/something/{target_id}`.
361
+ return path .split (sep = '/' , maxsplit = 2 )[- 1 ]
362
+
353
363
354
364
# See https://github.com/adamtheturtle/vws-python/issues/846.
355
365
class DateRangeError (Exception ): # pragma: no cover
Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ def test_target_status_not_success(
311
311
vws_client .update_target (target_id = target_id )
312
312
313
313
assert exc .value .response .status_code == codes .FORBIDDEN
314
+ assert exc .value .target_id == target_id
314
315
315
316
316
317
def test_match_processing (
You can’t perform that action at this time.
0 commit comments