diff --git a/airbyte_cdk/sources/streams/http/error_handlers/default_error_mapping.py b/airbyte_cdk/sources/streams/http/error_handlers/default_error_mapping.py index 45716768fd..464f7945b8 100644 --- a/airbyte_cdk/sources/streams/http/error_handlers/default_error_mapping.py +++ b/airbyte_cdk/sources/streams/http/error_handlers/default_error_mapping.py @@ -30,7 +30,7 @@ ), 400: ErrorResolution( response_action=ResponseAction.FAIL, - failure_type=FailureType.system_error, + failure_type=FailureType.config_error, error_message="HTTP Status Code: 400. Error: Bad request. Please check your request parameters.", ), 401: ErrorResolution( diff --git a/unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py b/unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py index 526e5760fc..2b202e1363 100644 --- a/unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py +++ b/unit_tests/sources/declarative/requesters/error_handlers/test_default_error_handler.py @@ -91,7 +91,7 @@ def test_default_error_handler_with_default_response_filter( parameters={}, ), ResponseAction.RETRY, - FailureType.system_error, + FailureType.config_error, "HTTP Status Code: 400. Error: Bad request. Please check your request parameters.", ), ( diff --git a/unit_tests/sources/mock_server_tests/test_resumable_full_refresh.py b/unit_tests/sources/mock_server_tests/test_resumable_full_refresh.py index 04e232083e..a2a88923c2 100644 --- a/unit_tests/sources/mock_server_tests/test_resumable_full_refresh.py +++ b/unit_tests/sources/mock_server_tests/test_resumable_full_refresh.py @@ -370,6 +370,6 @@ def test_resumable_full_refresh_failure(self, http_mocker): page=2 ) - assert actual_messages.errors[0].trace.error.failure_type == FailureType.system_error + assert actual_messages.errors[0].trace.error.failure_type == FailureType.config_error assert actual_messages.errors[0].trace.error.stream_descriptor.name == "justice_songs" assert "Bad request" in actual_messages.errors[0].trace.error.message diff --git a/unit_tests/sources/streams/http/test_http_client.py b/unit_tests/sources/streams/http/test_http_client.py index 48d396cb63..87a12d0014 100644 --- a/unit_tests/sources/streams/http/test_http_client.py +++ b/unit_tests/sources/streams/http/test_http_client.py @@ -785,13 +785,13 @@ def test_send_request_respects_environment_variables(): @pytest.mark.parametrize( "response_code, expected_failure_type, error_message, exception_class", [ - (400, FailureType.system_error, "test error message", UserDefinedBackoffException), + (400, FailureType.config_error, "test error message", UserDefinedBackoffException), (401, FailureType.config_error, "test error message", UserDefinedBackoffException), (403, FailureType.transient_error, "test error message", UserDefinedBackoffException), - (400, FailureType.system_error, "test error message", DefaultBackoffException), + (400, FailureType.config_error, "test error message", DefaultBackoffException), (401, FailureType.config_error, "test error message", DefaultBackoffException), (403, FailureType.transient_error, "test error message", DefaultBackoffException), - (400, FailureType.system_error, "test error message", RateLimitBackoffException), + (400, FailureType.config_error, "test error message", RateLimitBackoffException), (401, FailureType.config_error, "test error message", RateLimitBackoffException), (403, FailureType.transient_error, "test error message", RateLimitBackoffException), ],