We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afd09bc commit c88e386Copy full SHA for c88e386
src/vws/vws.py
@@ -272,7 +272,12 @@ def get_target_summary_report(
272
base_vws_url=self._base_vws_url,
273
)
274
275
- return dict(response.json())
+ 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)
281
282
def get_database_summary_report(self) -> Dict[str, Union[str, int]]:
283
"""
0 commit comments