Expand description
Unified error types for FraiseQL runtime crates.
All runtime crates depend on this crate for error handling.
§Error bridging contract
RuntimeError is the domain-level error enum that aggregates all business-logic errors
(auth, webhooks, files, notifications, etc.). It implements [axum::response::IntoResponse]
via the http module’s IntoResponse impl, which converts it to an [ErrorResponse] JSON body
with the appropriate HTTP status code:
RuntimeError (domain)
↓ IntoResponse (via fraiseql-error::http)
ErrorResponse { error, error_description, error_code, error_uri, details, retry_after }
↓ Json(response) + StatusCode
HTTP response body (application/json)§Mapping rules
RuntimeError variant | HTTP status |
|---|---|
Auth(InsufficientPermissions) | 403 Forbidden |
Auth(*) | 401 Unauthorized |
Webhook(InvalidSignature) | 401 Unauthorized |
RateLimited | 429 Too Many Requests |
ServiceUnavailable | 503 Service Unavailable |
NotFound | 404 Not Found |
Database | 500 Internal Server Error |
Config / Internal | 500 Internal Server Error |
§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§
- Auth
Error - Domain-level auth errors for HTTP response mapping.
- Config
Error - Errors that occur while loading or validating FraiseQL configuration.
- File
Error - Errors that occur during file upload, validation, storage, or retrieval.
- Integration
Error - Errors that occur when communicating with external integration services such as search engines, caches, or message queues.
- Notification
Error - Errors that occur during notification delivery (email, SMS, push, etc.).
- Observer
Error - Domain-level observer errors for
RuntimeErroraggregation. - Runtime
Error - Unified error type wrapping all domain errors.
- Webhook
Error - Errors that occur while receiving and validating inbound webhook requests.