From e57724cabe7db363e25aa880a42b325048cc35e9 Mon Sep 17 00:00:00 2001 From: FanouZeng-TT <18280587072@163.com> Date: Fri, 14 Aug 2026 21:24:19 +0800 Subject: [PATCH 1/2] fix: accept in-band missing fulfillment errors --- validation_test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/validation_test.py b/validation_test.py index 51d9718..306d7a2 100644 --- a/validation_test.py +++ b/validation_test.py @@ -373,7 +373,8 @@ def test_complete_without_fulfillment(self) -> None: Given a newly created checkout session without fulfillment details, When a completion request is submitted, - Then the server should return a 400 Bad Request error. + Then the server either rejects with a 4xx describing the fulfillment + problem, or returns an in-band error message with code 'missing'. """ response_json = self.create_checkout_session(select_fulfillment=False) checkout_id = response_json["id"] @@ -386,10 +387,10 @@ def test_complete_without_fulfillment(self) -> None: headers=integration_test_utils.get_headers(), ) - self.assert_4xx_error( + self.assert_business_error( response, - expected_status=400, - substring="Fulfillment address and option must be selected", + accepted_codes={"missing"}, + error_4xx_substring="fulfillment", ) def test_structured_error_messages(self) -> None: From 4575f0f9e577836cb47e6b3d8a614efb63f06c9c Mon Sep 17 00:00:00 2001 From: damaz91 Date: Mon, 17 Aug 2026 07:55:59 +0000 Subject: [PATCH 2/2] test: accept field_required in test_complete_without_fulfillment --- validation_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/validation_test.py b/validation_test.py index 306d7a2..07b061d 100644 --- a/validation_test.py +++ b/validation_test.py @@ -374,7 +374,8 @@ def test_complete_without_fulfillment(self) -> None: Given a newly created checkout session without fulfillment details, When a completion request is submitted, Then the server either rejects with a 4xx describing the fulfillment - problem, or returns an in-band error message with code 'missing'. + problem, or returns an in-band error message with code 'missing' or + 'field_required'. """ response_json = self.create_checkout_session(select_fulfillment=False) checkout_id = response_json["id"] @@ -389,7 +390,7 @@ def test_complete_without_fulfillment(self) -> None: self.assert_business_error( response, - accepted_codes={"missing"}, + accepted_codes={"missing", "field_required"}, error_4xx_substring="fulfillment", )