update docs about json

This commit is contained in:
David Lord 2022-07-02 21:32:55 -07:00
parent ca2bfbb0ac
commit f8cb0b0dd5
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
3 changed files with 31 additions and 23 deletions

View file

@ -1924,15 +1924,17 @@ class Flask(Scaffold):
raise TypeError(
f"{e}\nThe view function did not return a valid"
" response. The return type must be a string,"
" dict, list, tuple, Response instance, or WSGI"
f" callable, but it was a {type(rv).__name__}."
" dict, list, tuple with headers or status,"
" Response instance, or WSGI callable, but it"
f" was a {type(rv).__name__}."
).with_traceback(sys.exc_info()[2]) from None
else:
raise TypeError(
"The view function did not return a valid"
" response. The return type must be a string,"
" dict, list, tuple, Response instance, or WSGI"
f" callable, but it was a {type(rv).__name__}."
" dict, list, tuple with headers or status,"
" Response instance, or WSGI callable, but it was a"
f" {type(rv).__name__}."
)
rv = t.cast(Response, rv)