barycenter/src/errors.rs
Till Wegmueller 9b0481b258
refactor: update crabidp references to barycenter and add Gateway API support
Replace all remaining references to "crabidp" with "barycenter" across:
- Source code (error diagnostics, CLI name, comments)
- Configuration files and defaults
- Environment variable prefixes (CRABIDP__ → BARYCENTER__)
- Documentation (CLAUDE.md, README.md, DEPLOYMENT.md)
- Deployment configurations (Docker Compose, Helm, systemd, FreeBSD, illumos)
- Database filenames (crabidp.db → barycenter.db)

Add Kubernetes Gateway API support to Helm chart:
- New HTTPRoute template for Gateway API
- Configurable parentRefs, hostnames, filters, and weights
- Support for advanced traffic management features
- Gateway API as modern alternative to traditional Ingress
- Documentation and examples in DEPLOYMENT.md

Benefits of Gateway API:
- More expressive and extensible routing
- Role-oriented design with separation of concerns
- Better vendor portability
- Advanced traffic management capabilities

The Helm chart now supports both traditional Ingress and
Gateway API, allowing users to choose based on their cluster
capabilities and requirements.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:38:07 +01:00

39 lines
991 B
Rust

use miette::Diagnostic;
use thiserror::Error;
#[derive(Debug, Error, Diagnostic)]
pub enum CrabError {
#[error("I/O error: {0}")]
#[diagnostic(code(barycenter::io))]
Io(#[from] std::io::Error),
#[error("Config error: {0}")]
#[diagnostic(code(barycenter::config))]
Config(#[from] config::ConfigError),
#[error("Serialization error: {0}")]
#[diagnostic(code(barycenter::serde))]
Serde(#[from] serde_json::Error),
#[error("Database error: {0}")]
#[diagnostic(code(barycenter::db))]
Db(#[from] sea_orm::DbErr),
#[error("JOSE error: {0}")]
#[diagnostic(code(barycenter::jose))]
Jose(String),
#[error("Bad request: {0}")]
#[diagnostic(code(barycenter::bad_request))]
BadRequest(String),
#[error("{0}")]
#[diagnostic(code(barycenter::other))]
Other(String),
}
impl From<josekit::JoseError> for CrabError {
fn from(value: josekit::JoseError) -> Self {
CrabError::Jose(value.to_string())
}
}