Skip to main content
Glama
on_failure.rs564 B
use std::sync::Arc; use futures::future::BoxFuture; use tracing::error; use crate::Head; pub trait OnFailure { fn call(&mut self, head: Arc<Head>) -> BoxFuture<'static, ()>; } #[derive(Clone, Debug, Default)] pub struct DefaultOnFailure {} impl DefaultOnFailure { pub fn new() -> Self { Self::default() } } impl OnFailure for DefaultOnFailure { fn call(&mut self, head: Arc<Head>) -> BoxFuture<'static, ()> { Box::pin(async move { error!(subject = head.subject.as_str(), "message on failure",); }) } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server