is_non_retryable_stream_error(
error: BaseException | None,
) -> boolWhether reopening the stream would fail the same way.
True for a 4xx other than 408 and 429: the status of a refused stream request or WebSocket upgrade, or a WebSocket close code of 4000 plus that status. A server that rejects a WebSocket after accepting it closes with such a code, because a browser can't read the status of a refused upgrade.