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 @@ -206,6 +206,16 @@ def response(self) -> Response:
206206 """
207207 return self ._response
208208
209+ @property
210+ def target_id (self ) -> str :
211+ """
212+ The processing target ID.
213+ """
214+ path = urlparse (self .response .url ).path
215+ # Every HTTP path which can raise this error is in the format
216+ # `/something/{target_id}`.
217+ return path .split (sep = '/' , maxsplit = 2 )[- 1 ]
218+
209219
210220class ProjectInactive (Exception ):
211221 """
Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ def test_target_status_processing(
210210 vws_client .delete_target (target_id = target_id )
211211
212212 assert exc .value .response .status_code == codes .FORBIDDEN
213+ assert exc .value .target_id == target_id
213214
214215
215216def test_metadata_too_large (
You can’t perform that action at this time.
0 commit comments