re-raise error if error occurs before committing in streaming

update the tests.