The Streams specification has been updated with support for a hook to cleanup a TransformStream on error / abort. See https://github.com/whatwg/streams/pull/1283. WPTs are available: https://github.com/web-platform-tests/wpt/pull/40453