rok-core 0.6.0

Core primitives for the rok ecosystem — errors, crypto, i18n, config, DI, and more
Documentation

Core error types for the rok ecosystem.

Consolidates [RokError] (unified application error) and [Problem] (RFC 9457 problem details) into a single crate. The original rok-error and rok-problem crates are kept as deprecated shim re-exports.

Feature flags

Feature Enables
axum IntoResponse for RokError and Problem

Example

use rok_core::{RokError, Problem};
use axum::{Json, extract::Path};

async fn get_user(Path(id): Path<i64>) -> Result<Json<User>, RokError> {
    let user = User::find_or_fail(&pool, id).await?;
    Ok(Json(user))
}