better error-handling in response streams