Expand description
Unified error types for FraiseQL runtime crates.
All runtime crates depend on this crate for error handling.
§Canonical taxonomy
FraiseQLError is the single root error type for the FraiseQL workspace.
It is built around two layers:
- Engine variants (
Parse,Validation,Database,RateLimited,NotFound,ServiceUnavailable,Internal, …) which the core and runtime crates raise directly. - Domain composition variants (
Auth,Webhook,Observer,File) which wrap subsystem error types viaFromimpls owned by each subsystem crate (sqlx pattern). This letsfraiseql-errorstay a leaf crate while still exposing one unified taxonomy.
With the axum-compat feature enabled, FraiseQLError also implements
[axum::response::IntoResponse] so handlers can return
Result<_, FraiseQLError> directly; the conversion produces an
[ErrorResponse] JSON body with the appropriate HTTP status code.
FraiseQLError
↓ IntoResponse (via fraiseql-error::http, feature `axum-compat`)
ErrorResponse { error, error_description, error_code, error_uri, details, retry_after }
↓ Json(response) + StatusCode
HTTP response body (application/json)§Security note
All variants that might leak internal details (database messages, config values, provider endpoints) return generic descriptions in the HTTP response body. Raw error details are available only in structured server logs.
Re-exports§
pub use core_error::ErrorContext;pub use core_error::FraiseQLError;pub use core_error::Result;pub use core_error::ValidationFieldError;pub use graphql_error::GraphQLError;pub use graphql_error::GraphQLErrorLocation;
Modules§
- core_
error - Core error types for FraiseQL operations.
- graphql_
error - Canonical GraphQL protocol error types.
Enums§
- Config
Error - Errors that occur while loading or validating FraiseQL configuration.
- File
Error - Errors that occur during file upload, validation, storage, or retrieval.