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

HttpProvider should throw an error if it receives an invalid error #107

Closed
vilsbole opened this issue Aug 9, 2019 · 5 comments
Closed

Comments

@vilsbole
Copy link
Contributor

vilsbole commented Aug 9, 2019

Currently I can pass an object to HttpProvider which creates a cryptic error:
t.reduce is not a function

I expect the provider to fail if it receives and invalid url string.

@Mrtenz
Copy link
Collaborator

Mrtenz commented Aug 9, 2019

You shouldn't be able to use an object as URL if you're using TypeScript. Do you mean implementing actual runtime input validation?

@vilsbole
Copy link
Contributor Author

vilsbole commented Aug 9, 2019

Currently I don't get a TS error:
Screenshot 2019-08-09 at 19 42 19

Maybe because it's (correctly) serving the minified production version?

@Mrtenz
Copy link
Collaborator

Mrtenz commented Aug 9, 2019

Looks like your IDE can't find the TS types for some reason?

What IDE are you using?

@vilsbole
Copy link
Contributor Author

vilsbole commented Aug 9, 2019 via email

@Mrtenz
Copy link
Collaborator

Mrtenz commented Aug 9, 2019

The types are included in the published version and it works fine for me on IntelliJ IDEA, so it seems like it's an issue with your IDE.

@Mrtenz Mrtenz closed this as completed Aug 9, 2019
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