Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request() can return non Err errors #557

Closed
StefanoMagrassi opened this issue Mar 25, 2022 · 0 comments · Fixed by #558
Closed

request() can return non Err errors #557

StefanoMagrassi opened this issue Mar 25, 2022 · 0 comments · Fixed by #558
Labels
Milestone

Comments

@StefanoMagrassi
Copy link
Contributor

StefanoMagrassi commented Mar 25, 2022

Description
In some cases (request aborting?) the request() function seems to return a non-Err error in the Left branch.

In line 131 we use .catch() to catch all errors throwed by the previous fetch call, which should be already transformed in Err objects (ref. line 128).

This seems to not cover all possible cases: the toRequestError() transformation maybe should be moved in the .catch() block...

Current behavior
request() can return TaskEither.Left<Error> when fetch throws error.

Expected behavior
request() should return only TaskEither.Left<Err> when fetch throws error.

Environment:

  • OS: All
  • Browser: All
  • Node/npm version: All
  • Typescript version: All
@StefanoMagrassi StefanoMagrassi changed the title request() returns error request() can return non Err errors Mar 25, 2022
@StefanoMagrassi StefanoMagrassi added this to the 4.0.x milestone Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant