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

called Result::unwrap() on an Err value: Unknown("error sending request for url (https://hexbear.net/api/v3/user/login)") #10

Closed
Cynosure-null opened this issue Jun 8, 2024 · 3 comments

Comments

@Cynosure-null
Copy link

I'm unsure if this is the right place for this, but upon running this:

    let client = LemmyClient::new(ClientOptions {
    domain: String::from("hexbear.net"),
    secure: true
});
    let logininfo = Login{username_or_email: SensitiveString::from(env::var("bot_username").unwrap()),
password: SensitiveString::from(env::var("bot_password").unwrap()),
totp_2fa_token: None};

    client.login(logininfo).await.unwrap();

the thread panics on unwrapping client.login(logininfo).await with the message: called Result::unwrap()on anErr value: Unknown("error sending request for url (https://hexbear.net/api/v3/user/login)")

the error message from login is just Unknown

If I could get some guidance with this or if more verbose logging for errors could be added that would be ideal.

@airblast-dev
Copy link
Contributor

It is likely this: #9

Also the domain in the example uses 0.19.3. So you may have a few issues using the latest (0.19.4).

@SleeplessOne1917
Copy link
Member

I published a new lemmy-client version that has @airblast-dev's fix. If that still doesn't work for you, I reccomend using 0.19.3 for the time being until Hexbear upgrades.

@Cynosure-null
Copy link
Author

Sorry for the late reply but that fixed it

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

3 participants