feat: improve packet::parse tracing

This commit is contained in:
Tamipes 2025-12-06 20:18:54 +01:00
parent 7461b8ea30
commit f1c1b2c122
3 changed files with 41 additions and 17 deletions

View file

@ -82,11 +82,11 @@ impl From<&str> for OpaqueError {
}
}
impl From<crate::packets::ParseError> for OpaqueError {
fn from(value: crate::packets::ParseError) -> Self {
impl From<crate::packets::ParseErrorTrace> for OpaqueError {
fn from(value: crate::packets::ParseErrorTrace) -> Self {
Self {
span_trace: SpanTrace::capture(),
context: format!("{:?}", value),
span_trace: value.context,
context: format!("packet parse error: {:?}", value.inner),
}
}
}