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:
350350 """
351351 return self ._response
352352
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+
353363
354364# See https://github.com/adamtheturtle/vws-python/issues/846.
355365class 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(
311311 vws_client .update_target (target_id = target_id )
312312
313313 assert exc .value .response .status_code == codes .FORBIDDEN
314+ assert exc .value .target_id == target_id
314315
315316
316317def test_match_processing (
You can’t perform that action at this time.
0 commit comments