Skip to content

Commit bcc977e

Browse files
committed
raise RestError on 400
1 parent ac6cd69 commit bcc977e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mp_api/client/core/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,8 +994,9 @@ def _submit_request_and_process(
994994
)
995995

996996
if response.status_code in [400]:
997-
warnings.warn(
998-
f"The server does not support the request made to {response.url}. This may be due to an outdated mp-api package, or a problem with the query."
997+
raise MPRestError(
998+
f"The server does not support the request made to {response.url}. "
999+
"This may be due to an outdated mp-api package, or a problem with the query."
9991000
)
10001001

10011002
if response.status_code == 200:

0 commit comments

Comments
 (0)