Skip to content

Commit

Permalink
Use correct order for ResponseDecodingError
Browse files Browse the repository at this point in the history
Exchange the order of the parameters data and response when calling
ResponseDecodingError.
  • Loading branch information
marcelteun authored and commonism committed Jul 9, 2024
1 parent a1ffddd commit 78f09b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aiopenapi3/v20/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion aiopenapi3/v30/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 78f09b3

Please sign in to comment.