-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Closed
Labels
save-for-sprintPlease don't pick this unless you're participating in an official sprint.Please don't pick this unless you're participating in an official sprint.
Description
One of the most common errors/questions on Stack Overflow is some variant of "what does 'dict object is not callable' mean, how do I return JSON?" Now that #3111 is merged, returning dict from a view produces a JSON response. However, there are still plenty of other types that will produce that error, such as returning a bool, or a User object, or a list of rows from a database query.
Flask.make_response should check whether an otherwise unhandled value is a BaseResponse subclass or a callable before treating it as such. Then it can raise a more helpful error.
jabjohnzeringue
Metadata
Metadata
Assignees
Labels
save-for-sprintPlease don't pick this unless you're participating in an official sprint.Please don't pick this unless you're participating in an official sprint.