From cc8cfd3221234f062b8a320f8217bb8a567d81ae Mon Sep 17 00:00:00 2001 From: CloudAware <153455885+cloudgitaware@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:58:14 +0100 Subject: [PATCH] Allow http status codes 201 and 202 This commit relates to the same issue as https://github.com/cloudgitaware/python-zeep/commit/1221efb9d03559317edf0acb1c920a1e148a4242 --- src/zeep/wsdl/bindings/soap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zeep/wsdl/bindings/soap.py b/src/zeep/wsdl/bindings/soap.py index 3a5e5433..8940d506 100644 --- a/src/zeep/wsdl/bindings/soap.py +++ b/src/zeep/wsdl/bindings/soap.py @@ -225,7 +225,7 @@ def process_reply(self, client, operation, response): # If the response code is not 200 or if there is a Fault node available # then assume that an error occured. fault_node = doc.find("soap-env:Body/soap-env:Fault", namespaces=self.nsmap) - if response.status_code != 200 or fault_node is not None: + if response.status_code not in (200, 201, 202) or fault_node is not None: return self.process_error(doc, operation) result = operation.process_reply(doc)