diff --git a/stripe/api_requestor.py b/stripe/api_requestor.py index ee3f71592..220eaf198 100644 --- a/stripe/api_requestor.py +++ b/stripe/api_requestor.py @@ -177,9 +177,7 @@ def handle_error_response(self, rbody, rcode, resp, rheaders): raise err def specific_api_error(self, rbody, rcode, resp, rheaders, error_data): - message = error_data.get("message") or error_data.get( - "developer_message" - ) + message = error_data.get("message") util.log_info( "Stripe API error received", diff --git a/tests/test_api_requestor.py b/tests/test_api_requestor.py index 8429bc494..06fa9a57a 100644 --- a/tests/test_api_requestor.py +++ b/tests/test_api_requestor.py @@ -734,13 +734,6 @@ def test_extract_error_from_stream_request_for_response( 400, ) - def test_developer_message_in_error(self, requestor, mock_response): - mock_response('{"error": {"developer_message": "Unacceptable"}}', 400) - - with pytest.raises(stripe.error.InvalidRequestError) as excinfo: - requestor.request("get", self.valid_path, {}) - assert excinfo.value.user_message == "Unacceptable" - def test_raw_request_with_file_param(self, requestor, mock_response): test_file = tempfile.NamedTemporaryFile() test_file.write("\u263A".encode("utf-16"))