Skip to content

Commit c88e386

Browse files
committed
Progress towards UnknownTarget test
1 parent afd09bc commit c88e386

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vws/vws.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,12 @@ def get_target_summary_report(
272272
base_vws_url=self._base_vws_url,
273273
)
274274

275-
return dict(response.json())
275+
result_code = response.json()['result_code']
276+
if _ResultCodes(result_code) == _ResultCodes.SUCCESS:
277+
return dict(response.json())
278+
279+
exception = _EXCEPTIONS[_ResultCodes(result_code)]
280+
raise exception(response=response)
276281

277282
def get_database_summary_report(self) -> Dict[str, Union[str, int]]:
278283
"""

0 commit comments

Comments
 (0)