mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-05-19 00:31:09 +00:00
feat(webapi): log backtrace on database errors
This commit is contained in:
parent
2775068e49
commit
93d779b615
1 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
use std::backtrace::Backtrace;
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
@ -84,7 +85,7 @@ define_from_deser_rejection! {
|
|||
|
||||
impl From<rusqlite::Error> for ApiError {
|
||||
fn from(err: rusqlite::Error) -> Self {
|
||||
tracing::error!(%err, "database error");
|
||||
tracing::error!(%err, backtrace = %Backtrace::force_capture(), "database error");
|
||||
error_response!(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
"server_error",
|
||||
|
|
Loading…
Add table
Reference in a new issue