| Crates.io | domainstack-http |
| lib.rs | domainstack-http |
| version | 1.0.0 |
| created_at | 2026-01-06 13:52:04.934816+00 |
| updated_at | 2026-01-06 13:52:04.934816+00 |
| description | Framework-agnostic HTTP helpers for domainstack: boundary validation for web APIs |
| homepage | |
| repository | https://github.com/blackwell-systems/domainstack |
| max_upload_size | |
| id | 2025898 |
| size | 17,462 |
Framework-agnostic HTTP error handling for the domainstack full-stack validation ecosystem.
This crate provides shared HTTP error types and utilities used by framework-specific adapters like domainstack-axum and domainstack-actix.
Most users should use framework adapters directly instead of this crate:
Only use this crate directly if you're:
Add this to your Cargo.toml:
[dependencies]
domainstack = "1.0"
domainstack-http = "1.0"
ErrorResponse - Framework-agnostic HTTP error response:
use domainstack_http::ErrorResponse;
use domainstack::ValidationError;
let validation_error = ValidationError::single(
Path::from("email"),
"invalid_email",
"Invalid email format"
);
let response = ErrorResponse::from(validation_error);
// Contains error-envelope formatted response with 400 status
This crate is used internally by:
IntoResponse for AxumResponseError for Actix-webBoth adapters use ErrorResponse as their common error type and add framework-specific trait implementations.
If you're integrating domainstack with another web framework:
domainstack-http and domainstack-envelope dependenciesErrorResponse as your error typeErrorResponse::inner (which is error_envelope::Error) to your framework's response typeSee domainstack-axum or domainstack-actix source code for reference implementations.
For complete documentation and examples, see:
Apache 2.0