New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nicer error handling with mishandled responses #2219
Labels
Comments
Should has been fixed in #2327 |
@app.get("/case1")
async def handler(request):
response1 = await request.respond(headers={"one": "one"})
response2 = await request.respond(headers={"two": "two"})
await response1.send("One")
await response2.send("Two")
await response1.eof()
await response2.send("???")
await response2.eof()
@app.get("/case2")
async def handler(request):
response1 = await request.respond(headers={"one": "one"})
await response1.send("One")
await response1.eof()
await response1.send("Two")
app.run() Log:
Response:
The new version will behave like above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Two things here:
send
is called after theeof
, there should be a nicer error thanNoneType
that does not explain what happened to the stream.The text was updated successfully, but these errors were encountered: