=str #15242 Add test for converting onComplete to onError

Fixes #15242

It was already supported. Throwing from `onTermination` will result in downstream onError. I'm not sure if I have misunderstood the ticket.

// cc @bantonsson @jrudolph