forked from
smokesignal.events/quickdid
QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides handle-to-DID resolution with Redis-backed caching and queue processing.
1//! Error types for handle resolution operations.
2//!
3//! This module defines all error types used throughout the handle resolver components,
4//! following the QuickDID error format conventions.
5
6use thiserror::Error;
7
8/// Errors that can occur during handle resolution
9#[derive(Error, Debug)]
10pub enum HandleResolverError {
11 /// Failed to resolve subject through DNS or HTTP
12 #[error("error-quickdid-resolve-1 Failed to resolve subject: {0}")]
13 ResolutionFailed(String),
14
15 /// Handle not found in cache with specific error message
16 #[error("error-quickdid-resolve-2 Handle not found (cached): {0}")]
17 HandleNotFoundCached(String),
18
19 /// Handle not found in cache (generic)
20 #[error("error-quickdid-resolve-3 Handle not found (cached)")]
21 HandleNotFound,
22
23 /// Mock resolver failure for testing
24 #[error("error-quickdid-resolve-4 Mock resolution failure")]
25 MockResolutionFailure,
26
27 #[error("error-quickdid-resolve-5 Invalid subject: {0}")]
28 InvalidSubject(String),
29}