Skip to content

Try parsing email with Option<String> - #6628

Merged
Nutomic merged 1 commit into
mainfrom
oauth_login_email_fail_2
Aug 3, 2026
Merged

Try parsing email with Option<String>#6628
Nutomic merged 1 commit into
mainfrom
oauth_login_email_fail_2

Conversation

@dessalines

Copy link
Copy Markdown
Member

Context: #6609

let result = serde_json::from_value::<String>(value.clone())
.with_lemmy_type(LemmyErrorType::OauthLoginFailed)?;
return Ok(result);
serde_json::from_value::<Option<String>>(value.clone())

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main change is here. Github is returning email: null, and can't parse it as a string, so making this an option should work.

@Nutomic
Nutomic merged commit 4ce9243 into main Aug 3, 2026
2 checks passed
@Nutomic
Nutomic deleted the oauth_login_email_fail_2 branch August 3, 2026 01:18
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

Successfully merging this pull request may close these issues.

2 participants