Skip to main content

agent_service/
google_calendar_access_error.rs

1//! Errors returned while resolving an authorized Google Calendar for a tool call.
2
3use thiserror::Error;
4
5/// A fail-closed result from Google Calendar authorization.
6#[derive(Debug, Error)]
7pub enum GoogleCalendarAccessError {
8    #[error("the requested calendar is unavailable")]
9    NotFound,
10    #[error("the caller is not authorized to read this calendar")]
11    NotAuthorized,
12    #[error("the authenticated EME user or calendar identifier is invalid")]
13    InvalidIdentity,
14    #[error("the Google connection does not grant calendar event read access")]
15    InsufficientScopes,
16    #[error("the caller does not have write permission for this calendar")]
17    WriteNotAuthorized,
18    #[error("the Google connection does not grant calendar event write access")]
19    InsufficientWriteScopes,
20    #[error("Google Calendar authorization storage failed: {0}")]
21    Storage(String),
22    #[error("family membership could not be verified")]
23    FamilyUnavailable,
24}