-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid converting for unknown return types
In v0.9.3, the `StandardCoverter.create_response_body_converter` was changed to a pass-through converter: i.e., the method would simply return the given type as the response converter. This can cause unintended behavior in the case when the consumer method has a return annotation that is not handled by any registered converters. In this case, the converter chain will invoke the standard coverter's behavior, and try to convert the runtime response by invoking the annotated type's constructor. This can cause failures that are difficult to debug for end users, such as talkpython/100daysofcode-with-python-course#53. This regression was introduced in 89c43d1 (#204).
- Loading branch information
Showing
3 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters