streaming throws error in main thread when exception is caught