Fix pyfetch when there is a cors error. As pointed out by @ryanking13 in https://github.com/pyodide/pyodide/pull/2589#discussion_r878950933:
If `pyfetch` generates a cors error, it is thrown as a `JsException` rather than as an `OSError`.

### Checklists

- [x] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [x] Add / update tests

autodocsumm
docutils==0.16
myst-parser
packaging   # required by micropip at import time
sphinx>=4.4.0
sphinx-argparse-cli~=1.6.0
sphinx_book_theme
sphinxcontrib-napoleon>=0.7
sphinx-issues==2.0.0
sphinx-js==3.1
sphinx-version-warning~=1.1.2
sphinx-panels
markupsafe<2.1.0

autodocsumm
docutils==0.16
myst-parser
packaging   # required by micropip at import time
sphinx>=4.4.0
sphinx-argparse-cli~=1.6.0
sphinx_book_theme
sphinxcontrib-napoleon>=0.7
sphinx-issues==2.0.0
sphinx-js==3.1
sphinx-version-warning~=1.1.2
sphinx-panels
markupsafe<2.1.0
