systemprompt-models 0.1.21

Shared data models and types for systemprompt.io OS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use super::ApiError;
use crate::execution::context::RequestContext;

pub trait ApiErrorExt {
    fn with_request_context(self, ctx: &RequestContext) -> Self;
}

impl ApiErrorExt for ApiError {
    fn with_request_context(self, ctx: &RequestContext) -> Self {
        self.with_trace_id(ctx.trace_id().to_string())
    }
}