systemprompt_models/api/ext.rs
1use super::ApiError;
2use crate::execution::context::RequestContext;
3
4pub trait ApiErrorExt {
5 fn with_request_context(self, ctx: &RequestContext) -> Self;
6}
7
8impl ApiErrorExt for ApiError {
9 fn with_request_context(self, ctx: &RequestContext) -> Self {
10 self.with_trace_id(ctx.trace_id().to_string())
11 }
12}