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

package:
  name: beautifulsoup4
  version: 4.10.0
requirements:
  run:
    - soupsieve
source:
  sha256: 9a315ce70049920ea4572a4055bc4bd700c940521d36fc858205ad4fcde149bf
  url: https://files.pythonhosted.org/packages/69/bf/f0f194d3379d3f3347478bd267f754fc68c11cbf2fe302a6ab69447b1417/beautifulsoup4-4.10.0-py3-none-any.whl
test:
  imports:
    - bs4

package:
  name: beautifulsoup4
  version: 4.10.0
requirements:
  run:
    - soupsieve
source:
  sha256: 9a315ce70049920ea4572a4055bc4bd700c940521d36fc858205ad4fcde149bf
  url: https://files.pythonhosted.org/packages/69/bf/f0f194d3379d3f3347478bd267f754fc68c11cbf2fe302a6ab69447b1417/beautifulsoup4-4.10.0-py3-none-any.whl
test:
  imports:
    - bs4
