In Flask, a view must return one of the following:
- a string
Responseobject (or subclass)
- a tuple of
(string, status, headers)or
- a valid WSGI application
Flask tests for the first 3 options, and if they don’t fit, assumes it is the fourth. You returned True somewhere, and it is being treated as a WSGI application instead.
See About Responses in the documentation.