Comprehensive error handling and message generation for the RPC pipeline.
Provides clear, actionable error messages for all failure modes with detailed context for debugging and client consumption.
This is a shared module used by both AshTypescript and AshKotlinMultiplatform. Language-specific behavior is configured via the config parameter.
Summary
Functions
Builds a detailed error response from various error types.
Types
Functions
Builds a detailed error response from various error types.
Converts internal error tuples into structured error responses with clear messages and debugging context.
For Ash framework errors, uses the Error protocol for standardized extraction.
Returns either a single error map or a list of error maps (for Ash errors with multiple sub-errors).
Parameters
error- The error to build a response forconfig- Language-specific configuration with::output_field_formatter- The formatter to use for field names (default: :camel_case):field_formatter_module- The module to use for field formatting (default: AshIntrospection.FieldFormatter)