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

throwError() result is cached #29

Closed
fimius23 opened this issue Mar 28, 2019 · 3 comments
Closed

throwError() result is cached #29

fimius23 opened this issue Mar 28, 2019 · 3 comments

Comments

@fimius23
Copy link

Sometimes I like to validate the arguments for the function where the httpClient is used. If the arguments are invalid I use the throwError() function. Currently the logic of your library (which I find to be a great solution that inventively uses the power of typescript) will cache the result of throwError(). I wonder if it could not cache the result.

I did find a way around, which is to instantiate an HttpErrorResponse and pass that to the throwError() function, but I wonder if that should be required.

Thanks for your hard work!

@fimius23 fimius23 changed the title throwError() is cached throwError() result is cached Mar 28, 2019
@angelnikolov
Copy link
Owner

Hey @fimius23, I will try to find some time tomorrow or over the weekend, but in the meantime - a stackblitz repro is always welcome :)))

@fimius23
Copy link
Author

I'm not able to reproduce this problem. I did have a witness who swears he saw it too, and we are both confused. Hopefully I didn't waste any of your time!

@fimius23
Copy link
Author

Not reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants