From 78f09b3d6364d6778e30c8a3429377bf1b089520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20T=C3=BCnnissen?= Date: Tue, 9 Jul 2024 09:45:49 +0200 Subject: [PATCH] Use correct order for ResponseDecodingError Exchange the order of the parameters data and response when calling ResponseDecodingError. --- aiopenapi3/v20/glue.py | 2 +- aiopenapi3/v30/glue.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aiopenapi3/v20/glue.py b/aiopenapi3/v20/glue.py index 6e08a236..d44b930d 100644 --- a/aiopenapi3/v20/glue.py +++ b/aiopenapi3/v20/glue.py @@ -323,7 +323,7 @@ def _process_request(self, result: httpx.Response) -> Tuple["ResponseHeadersType try: data = json.loads(data) except json.decoder.JSONDecodeError: - raise ResponseDecodingError(self.operation, result, data) + raise ResponseDecodingError(self.operation, data, result) data = self.api.plugins.message.parsed( request=self, diff --git a/aiopenapi3/v30/glue.py b/aiopenapi3/v30/glue.py index aed709d8..87cbf6f9 100644 --- a/aiopenapi3/v30/glue.py +++ b/aiopenapi3/v30/glue.py @@ -555,7 +555,7 @@ def _process_request(self, result: httpx.Response) -> Tuple["ResponseHeadersType try: data = json.loads(data) except json.decoder.JSONDecodeError: - raise ResponseDecodingError(self.operation, result, data) + raise ResponseDecodingError(self.operation, data, result) data = self.api.plugins.message.parsed( request=self, operationId=self.operation.operationId,