Skip to content

Commit

Permalink
feat: display more detail of error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Mar 16, 2024
1 parent 6f99e36 commit de4e0ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ pub async fn answer(bot: Bot, msg: Message, cmd: Command, pool: DbPool) -> Respo
let token = match get_github_token(&msg.chat.id, secret).await {
Ok(s) => s.access_token,
Err(e) => {
bot.send_message(msg.chat.id, format!("Got error: {e}"))
bot.send_message(msg.chat.id, format!("Got error: {e:?}"))
.await?;
return Ok(());
}
Expand Down Expand Up @@ -472,19 +472,19 @@ pub async fn answer(bot: Bot, msg: Message, cmd: Command, pool: DbPool) -> Respo
return Ok(());
}
Err(e) => {
bot_send_message_handle_length(&bot, &msg, &format!("{e}"))
bot_send_message_handle_length(&bot, &msg, &format!("Failed to open pr: {e:?}"))
.await?;
return Ok(());
}
}
}
_ => {
bot_send_message_handle_length(&bot, &msg, &format!("{e}")).await?;
bot_send_message_handle_length(&bot, &msg, &format!("Failed to open pr: {e:?}")).await?;
return Ok(());
}
},
_ => {
bot_send_message_handle_length(&bot, &msg, &format!("{e}")).await?;
bot_send_message_handle_length(&bot, &msg, &format!("Failed to open pr: {e:?}")).await?;
return Ok(());
}
},
Expand Down

0 comments on commit de4e0ec

Please sign in to comment.