Skip to content

Commit

Permalink
hide debug error in release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
levkk committed Oct 21, 2024
1 parent 664882f commit a033d6b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rwf/src/http/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ impl Response {

pub fn internal_error(err: impl std::error::Error) -> Self {
// TODO:
// #[cfg(debug_asertions)]
// let err = format!("{:?}", err);
#[cfg(debug_assertions)]
let err = format!("{:?}", err);

// #[cfg(not(debug_asertions))]
// let err = "".to_string();
#[cfg(not(debug_assertions))]
let err = "";

Self::new()
.html(format!(
Expand All @@ -347,7 +347,7 @@ impl Response {
<br><br>
<center><code style=\"padding: 25px;\">{:?}</code></center>
",
err
err,
))
.code(500)
}
Expand Down

0 comments on commit a033d6b

Please sign in to comment.