We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ce27ac commit dcdd039Copy full SHA for dcdd039
Sandbox-API/Sandbox.py
@@ -38,7 +38,7 @@ def _request_and_parse(self, request_type, url_str, json_dict={}, data_dict={}):
38
response = requests.post(url_str, json=json_dict, headers=self.headers, data=json.dumps(data_dict))
39
40
if not response.ok:
41
- sys.exit('Error code: {}\nError text: {}\nP{} failed, exiting'.format(response.status_code,
+ raise Exception('Error code: {}\nError text: {}\nP{} failed, exiting'.format(response.status_code,
42
json.loads(response.text)[
43
'message'], url_str))
44
return response
0 commit comments