AshTypescript.Rpc.ErrorBuilder (ash_typescript v0.17.3)

Copy Markdown View Source

Comprehensive error handling and message generation for the new RPC pipeline.

Provides clear, actionable error messages for all failure modes with detailed context for debugging and client consumption.

Summary

Functions

Builds a detailed error response from various error types.

Functions

build_error_response(error)

@spec build_error_response(term()) :: map() | [map()]

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 new Error protocol for standardized extraction.

Returns either a single error map or a list of error maps (for Ash errors with multiple sub-errors).