Skip to content

Commit 7f33117

Browse files
committed
refactor(discord-token-refresh): Map error instead of unwrapping
1 parent 56b4de1 commit 7f33117

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oauth/routes/discord.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub(super) async fn discord_refresh_token(
188188
discord_connection.refresh_token_nonce,
189189
)
190190
.expose_once(|token| refresh_token(token, cfg))
191-
.unwrap()?;
191+
.map_err(|e| ApiError::message(Status::BadGateway, e))??;
192192

193193
// Refresh the token
194194
let token_expires_at =

0 commit comments

Comments
 (0)