update docs about json
This commit is contained in:
parent
ca2bfbb0ac
commit
f8cb0b0dd5
3 changed files with 31 additions and 23 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue