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

Panic on invalid port #84

Open
manio opened this issue Dec 26, 2020 · 3 comments
Open

Panic on invalid port #84

manio opened this issue Dec 26, 2020 · 3 comments

Comments

@manio
Copy link

manio commented Dec 26, 2020

Hi
There is a problem with error catching when an invalid port (out of range) is passed to the influxdb client, like this:
let client = Client::new("http://localhost:80876", "test");

IMHO it should be catched and passed in Err() instead of panic. Currently it is panicking (from surf crate):
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidPort', /home/manio/.cargo/registry/src/github.com-1ecc6299db9ec823/surf-2.1.0/src/client.rs:536:42

@Empty2k12
Copy link
Collaborator

Good catch! @manio

@samgans
Copy link

samgans commented Oct 14, 2021

Hi! If you haven't fixed this, I can take this issue and see what can I do.

@msrd0
Copy link
Collaborator

msrd0 commented Oct 14, 2021

@samgans Feel free to take a look at this, but I'm not sure if this can be fixed on our end since the stacktrace seems to start within surf.

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

No branches or pull requests

4 participants